Replaced e.message with str(e)
For logging the exception message: e.message has been deprecated. The preferred way is to call str(e). more details: https://www.python.org/dev/peps/pep-0352/ Change-Id: Ic22fbd37376843f714d2c1669d2cdc25a3569225
This commit is contained in:
parent
d26d358145
commit
3f7cc06aff
tackerclient/tests/unit
@ -711,7 +711,7 @@ class CLITestV10ExceptionHandler(CLITestV10Base):
|
||||
expected_msg = '\n'.join([error_msg, error_detail])
|
||||
else:
|
||||
expected_msg = error_msg
|
||||
self.assertEqual(expected_msg, e.message)
|
||||
self.assertEqual(expected_msg, str(e))
|
||||
|
||||
def test_exception_handler_v10_ip_address_in_use(self):
|
||||
err_msg = ('Unable to complete operation for network '
|
||||
|
@ -70,7 +70,7 @@ class TestHTTPClient(testtools.TestCase):
|
||||
|
||||
e = self.assertRaises(exceptions.Unauthorized,
|
||||
self.http._cs_request, URL, METHOD)
|
||||
self.assertEqual('unauthorized message', e.message)
|
||||
self.assertEqual('unauthorized message', str(e))
|
||||
self.mox.VerifyAll()
|
||||
|
||||
def test_request_forbidden_is_returned_to_caller(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user