"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "masakari/test.py" between
masakari-8.0.0.tar.gz and masakari-9.0.0.tar.gz

About: OpenStack Masakari provides "Instances High Availability Service" for OpenStack clouds by automatically recovering failed Instances (currently for KVM-based Virtual Machine(VM)s).
The "Ussuri" series (latest release).

test.py  (masakari-8.0.0):test.py  (masakari-9.0.0)
skipping to change at line 26 skipping to change at line 26
"""Base classes for our unit tests. """Base classes for our unit tests.
Allows overriding of flags for use of fakes, and some black magic for Allows overriding of flags for use of fakes, and some black magic for
inline callbacks. inline callbacks.
""" """
import contextlib import contextlib
import datetime import datetime
import eventlet import eventlet
eventlet.monkey_patch(os=False) # noqa eventlet.monkey_patch(os=False) # noqa
from unittest import mock
import fixtures import fixtures
import mock
import six import six
import testtools import testtools
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from oslo_serialization import jsonutils from oslo_serialization import jsonutils
from masakari.tests import fixtures as masakari_fixtures from masakari.tests import fixtures as masakari_fixtures
from masakari.tests.unit import conf_fixture from masakari.tests.unit import conf_fixture
skipping to change at line 182 skipping to change at line 182
inner(expected, observed) inner(expected, observed)
except testtools.matchers.MismatchError as e: except testtools.matchers.MismatchError as e:
inner_mismatch = e.mismatch inner_mismatch = e.mismatch
# inverting the observed / expected because testtools # inverting the observed / expected because testtools
# error messages assume expected is second. Possibly makes # error messages assume expected is second. Possibly makes
# reading the error messages less confusing. # reading the error messages less confusing.
raise testtools.matchers.MismatchError(observed, expected, raise testtools.matchers.MismatchError(observed, expected,
inner_mismatch, inner_mismatch,
verbose=True) verbose=True)
def assertObjEqual(self, expect, actual):
actual.obj_reset_changes(recursive=True)
expect.obj_reset_changes(recursive=True)
self.assertEqual(expect.obj_to_primitive(),
actual.obj_to_primitive())
def assertObjectList(self, expected, actual):
self.assertEqual(len(expected), len(actual))
for d1, d2 in zip(expected, actual):
self.assertObjEqual(d1, d2)
class NoDBTestCase(TestCase): class NoDBTestCase(TestCase):
"""`NoDBTestCase` differs from TestCase in that DB access is not supported. """`NoDBTestCase` differs from TestCase in that DB access is not supported.
This makes tests run significantly faster. If possible, all new tests This makes tests run significantly faster. If possible, all new tests
should derive from this class. should derive from this class.
""" """
USES_DB = False USES_DB = False
 End of changes. 3 change blocks. 
1 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)