Use exception.faultstring instead of exception.message
Use more compatibale way. Othterwise, in python3, it will report error: b"AttributeError: 'ClientSideError' object has no attribute 'message'" Partially-Implements: blueprint magnum-python3 Change-Id: I3c3cd4e1d7bd458a3c8b53186dc852b21c477583
This commit is contained in:
parent
581fe6a863
commit
e02f4cf31f
|
@ -138,7 +138,7 @@ class TestApiUtils(base.FunctionalTest):
|
|||
doc, patch)
|
||||
self.assertEqual(
|
||||
"Adding a new attribute /fake to the root of the resource is "
|
||||
"not allowed.", exc.message)
|
||||
"not allowed.", exc.faultstring)
|
||||
|
||||
def test_apply_jsonpatch_add_attr_already_exist(self):
|
||||
doc = {'bay_uuid': 'id', 'node_count': 1}
|
||||
|
@ -149,4 +149,4 @@ class TestApiUtils(base.FunctionalTest):
|
|||
|
||||
self.assertEqual(
|
||||
"The attribute /node_count has existed, please use "
|
||||
"'replace' operation instead.", exc.message)
|
||||
"'replace' operation instead.", exc.faultstring)
|
||||
|
|
Loading…
Reference in New Issue