def test_login_redirect(self): request = self.factory.get('/acquisition_counter/') request.user = self.user response = views.login_user(request) self.assertEqual(response.status_code, 302)
def test_login_wrong(self): request = self.factory.get('/acquisition_counter/') request.user = AnonymousUser() request.session = {} response = views.login_user(request) self.assertEqual(response.status_code, 200)