def test_wrong_email_and_wrong_password(self): mbkend = ModelBackend() auth_response = mbkend.authenticate('*****@*****.**', 'baz') self.assertEqual(auth_response, None)
def test_right_email_and_right_password(self): mbkend = ModelBackend() auth_response = mbkend.authenticate('*****@*****.**', '123') self.assertEqual(auth_response, self.user)
def test_right_username_and_wrong_password(self): mbkend = ModelBackend() auth_response = mbkend.authenticate('foo', 'baz') self.assertEqual(auth_response, None)