def test_login_response(self): """ This simulates a login and verifies that it receives a successful url request """ request = self.factory.get('/login/') response = user_auth(request) self.assertEqual(response.status_code, 200)
def test_existing_user(self): """ This simulates the login of an existing user and verifies that it receives a successful url request """ request = self.factory.post('/login/', { 'username': '******', 'password': '******', }) response = user_auth(request) self.assertEqual(response.status_code, 200)