Merge "Stop using deprecated 'message' attribute in Exception"

changes/44/509444/16
Jenkins 5 years ago committed by Gerrit Code Review
commit 732b45ccb3
  1. 4
      magnum/tests/unit/common/test_exception.py

@ -28,11 +28,11 @@ class TestException(base.BaseTestCase):
def test_message_is_templated(self):
ex = TestMagnumException(name="NAME")
self.assertEqual("templated NAME", ex.message)
self.assertEqual("templated NAME", str(ex))
def test_custom_message_is_templated(self):
ex = TestMagnumException(_("custom templated %(name)s"), name="NAME")
self.assertEqual("custom templated NAME", ex.message)
self.assertEqual("custom templated NAME", str(ex))
def test_all_exceptions(self):
for name, obj in inspect.getmembers(exception):

Loading…
Cancel
Save