Closed ulrichb closed 13 years ago
with Stub() as resp_stub:
resp.status >> status
resp.reason >> '<reason>'
resp.getheader('Location', None) >> '<file_url>'
with Stub() as HTTPSConnection:
server = HTTPSConnection(any)
server.request(any, any, any, any) >> None
server.getresponse() >> resp_stub
server.close()
In the last line I get: "AttributeError: Stub Object received unexpected call. reason('')"
As I said in the code, the exception disappears, when I use httplib.HTTPSConnection.last_property_called = None before creating the second instance