Skip to content

Commit

Permalink
reset httppretty for each test
Browse files Browse the repository at this point in the history
this ensures that we call httpretty.reset() before calling
httppretty.register_uri(...), which ensures that we get a fresh
callback with the expected version of the metadata.

LP: #1658200
  • Loading branch information
larsks authored and smoser committed Jan 24, 2017
1 parent a3376d4 commit d3fbb5d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/unittests/test_datasource/test_gce.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def _request_callback(method, uri, headers):
else:
return (404, headers, '')

# reset is needed. https://github.com/gabrielfalcao/HTTPretty/issues/316
httpretty.reset()
httpretty.register_uri(httpretty.GET, MD_URL_RE, body=_request_callback)


Expand Down

0 comments on commit d3fbb5d

Please sign in to comment.