def patchobject(self, obj, attr, **kwargs):
mockfixture = self.useFixture(fixtures.MockPatchObject(obj, attr,
**kwargs))
return mockfixture.mock
# NOTE(pshchelo): this overrides the testtools.TestCase.patch method
# that does simple monkey-patching in favor of mock's patching
评论列表
文章目录