예제 #1
0
 def test_cannot_create_credential_with_existing_username(self):
     with self.assertRaises(api.BadCredentialValue):
         api.create_credential("yellow", "password2")
예제 #2
0
 def test_cannot_create_credential_with_empty_password(self):
     with self.assertRaises(api.BadCredentialValue):
         api.create_credential("yellow2", "")
예제 #3
0
 def test_cannot_create_credential_with_empty_username_and_password(self):
     with self.assertRaises(api.BadCredentialValue):
         api.create_credential("", "")
예제 #4
0
 def setUp(self):
     api.create_credential("yellow", "password1")
     api.create_credential("red", "password2")