mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-16 20:49:00 -04:00
Remove gnarly indentation
By combining the two `with` statements. No functional changes, split into a separate commit for easier reviewing.
This commit is contained in:
@@ -616,35 +616,36 @@ def test_route_choose_template_manage_api_keys_permissions(mocker,
|
||||
)
|
||||
]
|
||||
)
|
||||
def test_check_messages_back_link_without_help(app_,
|
||||
api_user_active,
|
||||
mock_login,
|
||||
mock_get_user_by_email,
|
||||
mock_get_users_by_service,
|
||||
mock_get_service,
|
||||
mock_get_service_template_with_placeholders,
|
||||
mock_has_permissions,
|
||||
mock_get_service_statistics_for_day,
|
||||
mock_s3_download,
|
||||
fake_uuid,
|
||||
extra_args,
|
||||
expected_url):
|
||||
with app_.test_request_context():
|
||||
with app_.test_client() as client:
|
||||
client.login(api_user_active)
|
||||
with client.session_transaction() as session:
|
||||
session['upload_data'] = {'original_file_name': 'valid.csv',
|
||||
'template_id': fake_uuid,
|
||||
'notification_count': 1,
|
||||
'valid': True}
|
||||
response = client.get(url_for(
|
||||
'main.check_messages',
|
||||
service_id=fake_uuid,
|
||||
upload_id=fake_uuid,
|
||||
template_type='sms',
|
||||
from_test=True,
|
||||
**extra_args
|
||||
))
|
||||
def test_check_messages_back_link(
|
||||
app_,
|
||||
api_user_active,
|
||||
mock_login,
|
||||
mock_get_user_by_email,
|
||||
mock_get_users_by_service,
|
||||
mock_get_service,
|
||||
mock_get_service_template_with_placeholders,
|
||||
mock_has_permissions,
|
||||
mock_get_service_statistics_for_day,
|
||||
mock_s3_download,
|
||||
fake_uuid,
|
||||
extra_args,
|
||||
expected_url
|
||||
):
|
||||
with app_.test_request_context(), app_.test_client() as client:
|
||||
client.login(api_user_active)
|
||||
with client.session_transaction() as session:
|
||||
session['upload_data'] = {'original_file_name': 'valid.csv',
|
||||
'template_id': fake_uuid,
|
||||
'notification_count': 1,
|
||||
'valid': True}
|
||||
response = client.get(url_for(
|
||||
'main.check_messages',
|
||||
service_id=fake_uuid,
|
||||
upload_id=fake_uuid,
|
||||
template_type='sms',
|
||||
from_test=True,
|
||||
**extra_args
|
||||
))
|
||||
assert response.status_code == 200
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
assert (
|
||||
|
||||
Reference in New Issue
Block a user