Skip to content

Commit

Permalink
Merge pull request #317 from smoser/issue/316
Browse files Browse the repository at this point in the history
Call reset from setUp and tearDown in addition to enable and disable.
  • Loading branch information
gabrielfalcao committed Sep 9, 2018
2 parents 43e9b85 + 01474bf commit 0d53619
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions httpretty/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1598,6 +1598,7 @@ def decorate_unittest_TestCase_setUp(klass):
else None)

def new_setUp(self):
httpretty.reset()
httpretty.enable()
if use_addCleanup:
self.addCleanup(httpretty.disable)
Expand All @@ -1612,6 +1613,7 @@ def new_setUp(self):

def new_tearDown(self):
httpretty.disable()
httpretty.reset()
if original_tearDown:
original_tearDown(self)
klass.tearDown = new_tearDown
Expand Down

0 comments on commit 0d53619

Please sign in to comment.