From 979468b4f1263257deba4926f392cd32b2eb129f Mon Sep 17 00:00:00 2001 From: joo Date: Sat, 6 Jan 2018 19:25:55 +0000 Subject: [PATCH] test_authenticate_wrong_credentials: compare exception string instead of yggdrasil_message, so failure message is more useful in case the latter is None. --- tests/test_authentication.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_authentication.py b/tests/test_authentication.py index 3e9b952..b48341f 100644 --- a/tests/test_authentication.py +++ b/tests/test_authentication.py @@ -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.")