diff --git a/tests/app/main/views/test_user_profile.py b/tests/app/main/views/test_user_profile.py index 6136a98a5..ff0a15ebf 100644 --- a/tests/app/main/views/test_user_profile.py +++ b/tests/app/main/views/test_user_profile.py @@ -263,7 +263,7 @@ def test_non_gov_user_cannot_see_change_email_link( ): client_request.login(api_nongov_user_active) page = client_request.get('main.user_profile') - assert '' not in str(page) + assert not page.find('a', {'href': url_for('main.user_profile_email')}) assert page.select_one('h1').text.strip() == 'Your profile'