summaryrefslogtreecommitdiff
path: root/mocker.py
diff options
context:
space:
mode:
authorGustavo Niemeyer <gustavo@niemeyer.net>2008-07-01 14:05:27 -0300
committerGustavo Niemeyer <gustavo@niemeyer.net>2008-07-01 14:05:27 -0300
commita2a848a3c15915639e33241a4016846a9e082906 (patch)
treee3e4a242f36a62535fe09f6b323a47295c091683 /mocker.py
parent87e6cf304120f11ff7f163f1a98291682c34b988 (diff)
downloadmocker-a2a848a3c15915639e33241a4016846a9e082906.tar.gz
Prevent the MockerTestCase base from leaving the mocker in replay mode
while the base class run() method runs, since this might have additional logic which touches mocked content (time.time() was one case). Thanks to Thomas for the initial debugging.
Diffstat (limited to 'mocker.py')
-rw-r--r--mocker.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/mocker.py b/mocker.py
index 37e4ddb..e4a8f04 100644
--- a/mocker.py
+++ b/mocker.py
@@ -115,6 +115,7 @@ class MockerTestCase(unittest.TestCase):
result.addCallback(verify)
else:
self.mocker.verify()
+ self.mocker.restore()
return result
# Copy all attributes from the original method..
for attr in dir(test_method):