Skip to content

Commit

Permalink
Fix legacy repository redirection test
Browse files Browse the repository at this point in the history
  • Loading branch information
sdispater authored and finswimmer committed Jan 30, 2021
1 parent 63a952e commit c23c574
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/repositories/test_legacy_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def test_get_4xx_and_5xx_raises(http):
repo._get(endpoint)


def test_get_redirected_response_url(http, monkeypatch):
def test_get_redirected_response_url(http, mocker):
repo = MockHttpRepository({"/foo": 200}, http)
redirect_url = "http://legacy.redirect.bar"

Expand All @@ -345,5 +345,5 @@ def get_mock(url):
response.url = redirect_url + "/foo"
return response

monkeypatch.setattr(repo.session, "get", get_mock)
mocker.patch.object(requests.Session, "get", side_effect=get_mock)
assert repo._get("/foo")._url == "http://legacy.redirect.bar/foo/"

0 comments on commit c23c574

Please sign in to comment.