diff --git a/tests/bugfixes/nosetests/test_425_latest_requests.py b/tests/bugfixes/nosetests/test_425_latest_requests.py index 72578c87..ec010b89 100644 --- a/tests/bugfixes/nosetests/test_425_latest_requests.py +++ b/tests/bugfixes/nosetests/test_425_latest_requests.py @@ -1,3 +1,4 @@ +import re import requests import httpretty from httpretty.errors import UnmockedError @@ -27,3 +28,15 @@ def test_latest_requests(): requests.get('http://google.com/') httpretty.latest_requests().should.have.length_of(4) httpretty.latest_requests()[-1].url.should.equal('http://google.com/') + + +@httpretty.activate(allow_net_connect=True) +def test_latest_requests_with_enable(): + "#425 - httpretty.latest_requests() can be called multiple times" + httpretty.register_uri(httpretty.GET, 'https://google.com/', body="Not Google") + + requests.get('https://google.com/', data={"baz": "bar"}) + + httpretty.latest_requests()[-1].url.should.equal('https://google.com/') + httpretty.latest_requests().should.have.length_of(1) +