Skip to content

Commit

Permalink
Update tests to account for not following redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Dec 14, 2024
1 parent 4f287dd commit 65a0299
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/unit/contentproviders/test_dataverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ def doi_resolver(req, context):
assert requests_mock.call_count == 0
# valid Dataverse DOIs trigger this content provider
assert Dataverse().detect(test_input[0]) == expected[0]
# 4: doi resolution (302), File, doi resolution (302), then dataset
assert requests_mock.call_count == 4
# 4: doi resolution (302), doi resolution (302)
assert requests_mock.call_count == 2
requests_mock.reset_mock()

assert Dataverse().detect(test_input[1]) == expected[0]
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/contentproviders/test_doi.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_url_headers(requests_mock):
@pytest.mark.parametrize(
"requested_doi, expected",
[
("10.5281/zenodo.3242074", "https://zenodo.org/records/3242074"),
("10.5281/zenodo.3242074", "https://zenodo.org/record/3242074"),
# Unresolving DOI:
("10.1/1234", "10.1/1234"),
],
Expand Down

0 comments on commit 65a0299

Please sign in to comment.