Created
April 3, 2019 09:33
-
-
Save michaelrice/add5068a5c31ea36c960f0cc82fa84b7 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
class GifViewsTest(TestCase): | |
def setUp(self): | |
self.user = CustomUser(username="test1", password="passthis") | |
self.user.save() | |
self.user.full_clean() | |
def test_logged_in_index_uses_correct_template(self): | |
self.client.login( | |
username=self.user.username, | |
password=self.user.password | |
) | |
response = self.client.get(reverse("index")) | |
self.assertEqual(response.status_code, 200) | |
#################################### | |
# | |
# Result: | |
# AssertionError: 302 != 200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment