summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oslo_vmware/tests/test_exceptions.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/oslo_vmware/tests/test_exceptions.py b/oslo_vmware/tests/test_exceptions.py
index 419b769..2ef24a7 100644
--- a/oslo_vmware/tests/test_exceptions.py
+++ b/oslo_vmware/tests/test_exceptions.py
@@ -43,7 +43,8 @@ class ExceptionsTest(base.TestCase):
def test_vim_fault_exception(self):
vfe = exceptions.VimFaultException([ValueError("example")], _("cause"))
string = str(vfe)
- self.assertEqual("cause\nFaults: [ValueError('example',)]", string)
+ self.assertIn(string, ["cause\nFaults: [ValueError('example',)]",
+ "cause\nFaults: [ValueError('example')]"])
def test_vim_fault_exception_with_cause_and_details(self):
vfe = exceptions.VimFaultException([ValueError("example")],
@@ -51,11 +52,14 @@ class ExceptionsTest(base.TestCase):
"FooBar",
{'foo': 'bar'})
string = str(vfe)
- self.assertEqual("MyMessage\n"
- "Cause: FooBar\n"
- "Faults: [ValueError('example',)]\n"
- "Details: {'foo': 'bar'}",
- string)
+ self.assertIn(string, ["MyMessage\n"
+ "Cause: FooBar\n"
+ "Faults: [ValueError('example',)]\n"
+ "Details: {'foo': 'bar'}",
+ "MyMessage\n"
+ "Cause: FooBar\n"
+ "Faults: [ValueError('example')]\n"
+ "Details: {'foo': 'bar'}"])
def _create_subclass_exception(self):
class VimSubClass(exceptions.VimException):