diff options
author | Bryan Newbold <bnewbold@archive.org> | 2021-05-19 15:50:06 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2021-05-19 15:50:06 -0700 |
commit | 4e452afae432ac718482b62d276bee42adc1e660 (patch) | |
tree | 9ea40e6053e3bdce32a8312a14b4dfae0094deec /tests/test_web.py | |
parent | ef752720afe63dbcc960777fdb189c216f8a9dc8 (diff) | |
download | fatcat-scholar-4e452afae432ac718482b62d276bee42adc1e660.tar.gz fatcat-scholar-4e452afae432ac718482b62d276bee42adc1e660.zip |
web: fixes to access redirect endpoints
Diffstat (limited to 'tests/test_web.py')
-rw-r--r-- | tests/test_web.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_web.py b/tests/test_web.py index fc7ea14..ee11ee6 100644 --- a/tests/test_web.py +++ b/tests/test_web.py @@ -179,3 +179,14 @@ def test_access_redirects(client: Any, mocker: Any) -> None: rv.headers["Location"] == "https://web.archive.org/web/20170814015956id_/https://epub.uni-regensburg.de/21901/1/lorenz73.pdf" ) + + # spaces ("%20" vs "+") + rv = client.get( + "/access/wayback/20170811115414/http://sudjms.net/issues/5-4/pdf/8)A%20comparison%20study%20of%20histochemical%20staining%20of%20various%20tissues%20after.pdf", + allow_redirects=False, + ) + assert rv.status_code == 302 + assert ( + rv.headers["Location"] + == "https://web.archive.org/web/20170811115414id_/http://sudjms.net/issues/5-4/pdf/8)A%20comparison%20study%20of%20histochemical%20staining%20of%20various%20tissues%20after.pdf" + ) |