Remove mox usage from test_heat_client
Change-Id: I3b68374e2de6b87a9389f11386eba7f7908c9915 goal: mox-removal
This commit is contained in:
parent
0dcd3e32c6
commit
09f203cb85
File diff suppressed because it is too large
Load Diff
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user