Beispiel #1
0
 def test_incorrect_password_returns_false(self):
     self.assertFalse(api.check_credentials("yellow", ""))
     self.assertFalse(api.check_credentials("yellow", "incorrect"))
     self.assertFalse(api.check_credentials("yellow", "badpassword1"))
     self.assertFalse(api.check_credentials("yellow", "password1bad"))
Beispiel #2
0
 def test_correct_credentials_return_true(self):
     self.assertTrue(api.check_credentials("yellow", "password1"))
     self.assertTrue(api.check_credentials("red", "password2"))
Beispiel #3
0
 def test_incorrect_username_returns_false(self):
     self.assertFalse(api.check_credentials("", "password1"))
     self.assertFalse(api.check_credentials("incorrect", "password1"))
     self.assertFalse(api.check_credentials("badyellow", "password1"))
     self.assertFalse(api.check_credentials("yellowbad", "password1"))