Reset POTENTIAL_HTTP_PORTS with reset

HTTPretty.reset removes all the HTTP mocks that are put in places. There
is therefore no reason to keep around potential http ports that are not
in the current list of mocks.

Therefore we should reset that set as well when we reset the mocks.
This commit is contained in:
Jamie Lennox
2014-01-15 11:06:25 +10:00
committed by Cyril Roelandt
parent 9357c8c22f
commit 2e814635ff

View File

@@ -843,6 +843,8 @@ class httpretty(HttpBaseClass):
@classmethod
def reset(cls):
global POTENTIAL_HTTP_PORTS
POTENTIAL_HTTP_PORTS = set([80, 443])
cls._entries.clear()
cls.latest_requests = []
cls.last_request = HTTPrettyRequestEmpty()