Created
April 14, 2019 15:01
-
-
Save Enforcer/e4a7cd5552908bcc6ece1b1351ebd0fe 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
def test_dashboard_requires_login(client): | |
user = User.objects.create(...) # 1 | |
response = client.get('/dashboard') # 2 | |
self.assertRedirects(response, '/accounts/login') # 3 | |
assert user.last_access_attempt = ... # 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment