test_authenticate_wrong_credentials: compare exception string instead of yggdrasil_message, so failure message is more useful in case the latter is None.
This commit is contained in:
1 parent
53312f997b
commit
979468b4f1
1 file changed
+3
-2
@@ -191,8 +191,9 @@ class AuthenticateAuthenticationToken(unittest.TestCase):
|
|||||||
with self.assertRaises(YggdrasilError) as cm:
|
with self.assertRaises(YggdrasilError) as cm:
|
||||||
a.authenticate("Billy", "The Goat")
|
a.authenticate("Billy", "The Goat")
|
||||||
|
|
||||||
err = "Invalid credentials. Invalid username or password."
|
err = "[403] ForbiddenOperationException: " \
|
||||||
self.assertEqual(cm.exception.yggdrasil_message, err)
|
"'Invalid credentials. Invalid username or password.'"
|
||||||
|
self.assertEqual(str(cm.exception), err)
|
||||||
|
|
||||||
@unittest.skipIf(should_skip_cred_test(),
|
@unittest.skipIf(should_skip_cred_test(),
|
||||||
"Need credentials to perform test.")
|
"Need credentials to perform test.")
|
||||||
|
|||||||
Reference in new issue
Block a user