Rewrite test for clear cache radio buttons

This was missing an existing option to clear for broadcasts.
This commit is contained in:
Ben Thorner
2022-02-21 11:19:50 +00:00
parent 8396412ce1
commit 16a14cd642

View File

@@ -734,13 +734,18 @@ def test_clear_cache_shows_form(
page = client_request.get('main.clear_cache')
assert page.select('input[type=radio]')[0]['value'] == 'user'
assert page.select('input[type=radio]')[1]['value'] == 'service'
assert page.select('input[type=radio]')[2]['value'] == 'template'
assert page.select('input[type=radio]')[3]['value'] == 'email_branding'
assert page.select('input[type=radio]')[4]['value'] == 'letter_branding'
assert page.select('input[type=radio]')[5]['value'] == 'organisation'
assert not redis.delete_cache_keys_by_pattern.called
radios = {el['value'] for el in page.select('input[type=radio]')}
assert radios == {
'user',
'service',
'template',
'email_branding',
'letter_branding',
'organisation',
'broadcast'
}
@pytest.mark.parametrize('model_type, expected_calls, expected_confirmation', (