Remove mox usage from test_heat_client

Change-Id: I3b68374e2de6b87a9389f11386eba7f7908c9915
goal: mox-removal
This commit is contained in:
ricolin 2018-03-30 20:20:39 +08:00
parent 0dcd3e32c6
commit 09f203cb85
2 changed files with 389 additions and 401 deletions

File diff suppressed because it is too large Load Diff

View File

@ -203,3 +203,16 @@ class ForeignKeyConstraintFixture(fixtures.Fixture):
self.useFixture(fixtures.MockPatchObject(db_api, '_facade', None))
self.addCleanup(db_api.db_context.patch_factory(new_context._factory))
class AnyInstance(object):
"""Comparator for validating allowed instance type."""
def __init__(self, allowed_type):
self._allowed_type = allowed_type
def __eq__(self, other):
return isinstance(other, self._allowed_type)
def __ne__(self, other):
return not self.__eq__(other)