Browse Source

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

changes/44/509444/16
Jenkins 4 years ago
committed by Gerrit Code Review
parent
commit
732b45ccb3
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      magnum/tests/unit/common/test_exception.py

+ 2
- 2
magnum/tests/unit/common/test_exception.py View File

@ -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