Created
October 9, 2017 03:28
-
-
Save jamesvandyne/2abad11a86a8c17d9f0670d7915316eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pytest.mark.django_db | |
def test_not_confirmed_redirects_anonymous_user_to_dashboard(anon_user): | |
view = Mock() | |
redirect = "/login/" | |
request = create_get_request(redirect, anon_user) | |
response = not_confirmed(view)(request) | |
assert not view.called | |
assert response.redirect == redirect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment