def testAuthenticateSuccess(self): """Attempt to authenticate user w/ correct email address and pw and assert user object is returned.""" user = EmailAddressAuthBackend.authenticate(self, username='******', password='******') self.assertTrue(type(user) is User)
def testAuthenticateFail(self): """ Attempt to authenticate user w/ incorrect password and assert user object is None """ user = EmailAddressAuthBackend.authenticate(self, username='******', password='******') self.assertIsNone(user)