diff options
Diffstat (limited to 'oslotest')
-rw-r--r-- | oslotest/mockpatch.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/oslotest/mockpatch.py b/oslotest/mockpatch.py index 2144ea2..7fbf0a6 100644 --- a/oslotest/mockpatch.py +++ b/oslotest/mockpatch.py @@ -31,8 +31,8 @@ class PatchObject(fixtures.Fixture): def setUp(self): super(PatchObject, self).setUp() _p = mock.patch.object(self.obj, self.attr, self.new, **self.kwargs) - self.mock = _p.start() self.addCleanup(_p.stop) + self.mock = _p.start() class Patch(fixtures.Fixture): @@ -46,8 +46,8 @@ class Patch(fixtures.Fixture): def setUp(self): super(Patch, self).setUp() _p = mock.patch(self.obj, self.new, **self.kwargs) - self.mock = _p.start() self.addCleanup(_p.stop) + self.mock = _p.start() class Multiple(fixtures.Fixture): @@ -76,5 +76,5 @@ class Multiple(fixtures.Fixture): def setUp(self): super(Multiple, self).setUp() _p = mock.patch.multiple(self.obj, **self.kwargs) - self.mock = _p.start() self.addCleanup(_p.stop) + self.mock = _p.start() |