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:
joo 2018-01-06 19:25:55 +00:00
parent 53312f997b
commit 979468b4f1
1 changed files with 3 additions and 2 deletions

View File

@ -191,8 +191,9 @@ class AuthenticateAuthenticationToken(unittest.TestCase):
with self.assertRaises(YggdrasilError) as cm:
a.authenticate("Billy", "The Goat")
err = "Invalid credentials. Invalid username or password."
self.assertEqual(cm.exception.yggdrasil_message, err)
err = "[403] ForbiddenOperationException: " \
"'Invalid credentials. Invalid username or password.'"
self.assertEqual(str(cm.exception), err)
@unittest.skipIf(should_skip_cred_test(),
"Need credentials to perform test.")