From fed40326da944e3a6e763c2920a09bb98e80b9cb Mon Sep 17 00:00:00 2001 From: David McDonald Date: Thu, 4 Mar 2021 16:54:41 +0000 Subject: [PATCH] Fix test assertion It wasn't varying the email address seen in the header based on the two parametrized cases. Not the end of the world, but we should make it correct --- tests/app/main/views/test_manage_users.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/app/main/views/test_manage_users.py b/tests/app/main/views/test_manage_users.py index 83e09232e..f5ae9b2e8 100644 --- a/tests/app/main/views/test_manage_users.py +++ b/tests/app/main/views/test_manage_users.py @@ -1004,7 +1004,7 @@ def test_invite_user( mock_get_template_folders, mock_get_organisations, ): - sample_invite['email_address'] = 'test@example.gov.uk' + sample_invite['email_address'] = email_address assert is_gov_user(email_address) == gov_user mocker.patch('app.models.user.InvitedUsers.client_method', return_value=[sample_invite]) @@ -1027,7 +1027,7 @@ def test_invite_user( ) assert page.h1.string.strip() == 'Team members' flash_banner = page.find('div', class_='banner-default-with-tick').string.strip() - assert flash_banner == 'Invite sent to test@example.gov.uk' + assert flash_banner == f"Invite sent to {email_address}" expected_permissions = {'manage_api_keys', 'manage_service', 'manage_templates', 'send_messages', 'view_activity'}