def test_cannot_create_credential_with_existing_username(self): with self.assertRaises(api.BadCredentialValue): api.create_credential("yellow", "password2")
def test_cannot_create_credential_with_empty_password(self): with self.assertRaises(api.BadCredentialValue): api.create_credential("yellow2", "")
def test_cannot_create_credential_with_empty_username_and_password(self): with self.assertRaises(api.BadCredentialValue): api.create_credential("", "")
def setUp(self): api.create_credential("yellow", "password1") api.create_credential("red", "password2")