-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #579 from MITLibraries/IN-1038-gracefully-handle-n…
…etwork-timeouts IN 1038 - handle more base RequestException
- Loading branch information
Showing
13 changed files
with
5,342 additions
and
553 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
tests/tests/fixtures/vcr_cassettes/get-identifiers-no-matches.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- python-requests/2.32.3 | ||
method: GET | ||
uri: https://dspace.mit.edu/oai/request?metadataPrefix=oai_dc&from=2021-12-26&until=2021-12-26&set=hdl_1721.1_49432&verb=ListIdentifiers | ||
response: | ||
body: | ||
string: <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" | ||
href="static/style.xsl"?><OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ | ||
http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"><responseDate>2024-08-21T17:16:17Z</responseDate><request | ||
verb="ListIdentifiers" metadataPrefix="oai_dc" from="2021-12-26T00:00:00Z" | ||
until="2021-12-26T00:00:00Z" set="hdl_1721.1_49432">https://dspace.mit.edu//oai/request</request><error | ||
code="noRecordsMatch">No matches for the query</error></OAI-PMH> | ||
headers: | ||
Connection: | ||
- close | ||
Content-Encoding: | ||
- gzip | ||
Content-Type: | ||
- text/xml;charset=UTF-8 | ||
Date: | ||
- Wed, 21 Aug 2024 17:16:17 GMT | ||
Set-cookie: | ||
- HttpOnly;Secure | ||
Strict-Transport-Security: | ||
- max-age=63072000 | ||
Transfer-Encoding: | ||
- chunked | ||
Vary: | ||
- Accept-Encoding | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Frame-Options: | ||
- SAMEORIGIN | ||
X-XSS-Protection: | ||
- 1; mode=block | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
Large diffs are not rendered by default.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
tests/tests/fixtures/vcr_cassettes/get-records-exclude-deleted.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- python-requests/2.32.3 | ||
method: GET | ||
uri: https://dspace.mit.edu/oai/request?metadataPrefix=oai_dc&from=2017-12-14&until=2017-12-14&verb=ListIdentifiers | ||
response: | ||
body: | ||
string: <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" | ||
href="static/style.xsl"?><OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ | ||
http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"><responseDate>2024-08-21T17:16:17Z</responseDate><request | ||
verb="ListIdentifiers" metadataPrefix="oai_dc" from="2017-12-14T00:00:00Z" | ||
until="2017-12-14T00:00:00Z">https://dspace.mit.edu//oai/request</request><ListIdentifiers><header | ||
status="deleted"><identifier>oai:dspace.mit.edu:1721.1/112746</identifier><datestamp>2017-12-14T15:03:59Z</datestamp><setSpec>com_1721.1_7803</setSpec><setSpec>hdl_1721.1_7803</setSpec><setSpec>col_1721.1_42001</setSpec><setSpec>hdl_1721.1_42001</setSpec></header></ListIdentifiers></OAI-PMH> | ||
headers: | ||
Connection: | ||
- close | ||
Content-Encoding: | ||
- gzip | ||
Content-Type: | ||
- text/xml;charset=UTF-8 | ||
Date: | ||
- Wed, 21 Aug 2024 17:16:17 GMT | ||
Set-cookie: | ||
- HttpOnly;Secure | ||
Strict-Transport-Security: | ||
- max-age=63072000 | ||
Transfer-Encoding: | ||
- chunked | ||
Vary: | ||
- Accept-Encoding | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Frame-Options: | ||
- SAMEORIGIN | ||
X-XSS-Protection: | ||
- 1; mode=block | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
97 changes: 97 additions & 0 deletions
97
tests/tests/fixtures/vcr_cassettes/get-records-include-deleted.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- python-requests/2.32.3 | ||
method: GET | ||
uri: https://dspace.mit.edu/oai/request?metadataPrefix=oai_dc&from=2017-12-14&until=2017-12-14&verb=ListIdentifiers | ||
response: | ||
body: | ||
string: <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" | ||
href="static/style.xsl"?><OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ | ||
http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"><responseDate>2024-08-21T17:16:17Z</responseDate><request | ||
verb="ListIdentifiers" metadataPrefix="oai_dc" from="2017-12-14T00:00:00Z" | ||
until="2017-12-14T00:00:00Z">https://dspace.mit.edu//oai/request</request><ListIdentifiers><header | ||
status="deleted"><identifier>oai:dspace.mit.edu:1721.1/112746</identifier><datestamp>2017-12-14T15:03:59Z</datestamp><setSpec>com_1721.1_7803</setSpec><setSpec>hdl_1721.1_7803</setSpec><setSpec>col_1721.1_42001</setSpec><setSpec>hdl_1721.1_42001</setSpec></header></ListIdentifiers></OAI-PMH> | ||
headers: | ||
Connection: | ||
- close | ||
Content-Encoding: | ||
- gzip | ||
Content-Type: | ||
- text/xml;charset=UTF-8 | ||
Date: | ||
- Wed, 21 Aug 2024 17:16:17 GMT | ||
Set-cookie: | ||
- HttpOnly;Secure | ||
Strict-Transport-Security: | ||
- max-age=63072000 | ||
Transfer-Encoding: | ||
- chunked | ||
Vary: | ||
- Accept-Encoding | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Frame-Options: | ||
- SAMEORIGIN | ||
X-XSS-Protection: | ||
- 1; mode=block | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- python-requests/2.32.3 | ||
method: GET | ||
uri: https://dspace.mit.edu/oai/request?identifier=oai%3Adspace.mit.edu%3A1721.1%2F112746&metadataPrefix=oai_dc&verb=GetRecord | ||
response: | ||
body: | ||
string: <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" | ||
href="static/style.xsl"?><OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ | ||
http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"><responseDate>2024-08-21T17:16:17Z</responseDate><request | ||
verb="GetRecord" identifier="oai:dspace.mit.edu:1721.1/112746" metadataPrefix="oai_dc">https://dspace.mit.edu//oai/request</request><GetRecord><record><header | ||
status="deleted"><identifier>oai:dspace.mit.edu:1721.1/112746</identifier><datestamp>2017-12-14T15:03:59Z</datestamp><setSpec>com_1721.1_7803</setSpec><setSpec>hdl_1721.1_7803</setSpec><setSpec>col_1721.1_42001</setSpec><setSpec>hdl_1721.1_42001</setSpec></header></record></GetRecord></OAI-PMH> | ||
headers: | ||
Connection: | ||
- close | ||
Content-Encoding: | ||
- gzip | ||
Content-Type: | ||
- text/xml;charset=UTF-8 | ||
Date: | ||
- Wed, 21 Aug 2024 17:16:17 GMT | ||
Set-cookie: | ||
- HttpOnly;Secure | ||
Strict-Transport-Security: | ||
- max-age=63072000 | ||
Transfer-Encoding: | ||
- chunked | ||
Vary: | ||
- Accept-Encoding | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Frame-Options: | ||
- SAMEORIGIN | ||
X-XSS-Protection: | ||
- 1; mode=block | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
Oops, something went wrong.