diff --git a/lacommunaute/users/tests/tests_views.py b/lacommunaute/users/tests/tests_views.py index 70c40d88..9225557f 100644 --- a/lacommunaute/users/tests/tests_views.py +++ b/lacommunaute/users/tests/tests_views.py @@ -145,6 +145,10 @@ def test_post( content = parse_response_to_soup(response, selector="main") assert str(content) == snapshot(name="login_view_content") + # double check login link is not visible in live mode + pattern = r'http.*?next=%2Ftopics%2F"' + assert re.search(pattern, str(content)) is None + payload_as_str = respx.calls[0].request.content.decode() assert validate_magiclink_payload(payload_as_str, uidb64, token, expected) @@ -206,6 +210,10 @@ def test_post_new_email( content = parse_response_to_soup(response, selector="main") assert str(content) == snapshot(name="create_user_view_content") + # double check login link is not visible in live mode + pattern = r'http.*?next=%2Ftopics%2F"' + assert re.search(pattern, str(content)) is None + created_user = User.objects.get(email=email) assert created_user.email == email assert created_user.first_name == "John"