コード例 #1
0
ファイル: tests.py プロジェクト: rojoca/auth-service-client
 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"))
コード例 #2
0
ファイル: tests.py プロジェクト: rojoca/auth-service-client
 def test_correct_credentials_return_true(self):
     self.assertTrue(api.check_credentials("yellow", "password1"))
     self.assertTrue(api.check_credentials("red", "password2"))
コード例 #3
0
ファイル: tests.py プロジェクト: rojoca/auth-service-client
 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"))