Address flake8 issues

This commit is contained in:
Ryan Ahearn
2022-08-09 14:14:49 +00:00
parent bdee795f56
commit 68129bc9f4
2 changed files with 11 additions and 6 deletions

View File

@@ -31,16 +31,20 @@ from tests.conftest import (
@pytest.mark.parametrize('permissions, expected_message', (
(['email'], (
'Every message starts with a template. You can change it later. You need a template before you can send emails, text messages or letters.'
'Every message starts with a template. You can change it later. '
'You need a template before you can send emails, text messages or letters.'
)),
(['sms'], (
'Every message starts with a template. You can change it later. You need a template before you can send emails, text messages or letters.'
'Every message starts with a template. You can change it later. '
'You need a template before you can send emails, text messages or letters.'
)),
(['letter'], (
'Every message starts with a template. You can change it later. You need a template before you can send emails, text messages or letters.'
'Every message starts with a template. You can change it later. '
'You need a template before you can send emails, text messages or letters.'
)),
(['email', 'sms', 'letter'], (
'Every message starts with a template. You can change it later. You need a template before you can send emails, text messages or letters.'
'Every message starts with a template. You can change it later. '
'You need a template before you can send emails, text messages or letters.'
)),
(['broadcast'], (
'Every message starts with a template. You can change it later. You havent added any templates yet.'
@@ -89,7 +93,8 @@ def test_should_show_add_template_form_if_service_has_folder_permission(
'Templates'
)
assert normalize_spaces(page.select_one('main p').text) == (
'Every message starts with a template. You can change it later. You need a template before you can send emails, text messages or letters.'
'Every message starts with a template. You can change it later. '
'You need a template before you can send emails, text messages or letters.'
)
assert [
(item['name'], item['value']) for item in page.select('[type=radio]')

View File

@@ -40,7 +40,7 @@ def test_load_cloudfoundry_config_if_available(reload_config):
}],
})
with mock.patch('app.cloudfoundry_config.extract_cloudfoundry_config', side_effect=cf_conf) as cf_config:
with mock.patch('app.cloudfoundry_config.extract_cloudfoundry_config', side_effect=cf_conf):
# reload config so that its module level code (ie: all of it) is re-instantiated
importlib.reload(config)