Merge "Remove mox usage from test_heat_client"

This commit is contained in:
Zuul 2018-07-10 04:29:16 +00:00 committed by Gerrit Code Review
commit 6cafa995c1
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)