Created
November 20, 2018 10:37
-
-
Save joshtrigger/6c0217cec35e2c01849a3760c858511a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from django.test import Client, TestCase | |
class TestLogin(TestCase): | |
def setUp(self): | |
self.client = Client() | |
self.data = { | |
'username' : 'joshua', | |
'email' : '[email protected]', | |
'password' : 'qwerty' | |
} | |
def test_login_user(self): | |
"""test user login with correct credentials""" | |
response = self.client.post('users/login', self.data) | |
self.assertEqual(response.status_code, 200) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment