Skip to content

Commit

Permalink
Fix test cassettes to be compatible with urllib3 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin committed Apr 28, 2023
1 parent 090856f commit 46ed438
Show file tree
Hide file tree
Showing 5 changed files with 314 additions and 109 deletions.
78 changes: 67 additions & 11 deletions tests/cassettes/file_for_download.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"http_interactions": [
{
"recorded_at": "2018-01-04T23:00:12",
"recorded_at": "2023-04-28T19:10:03",
"request": {
"body": {
"base64_string": "",
"encoding": "utf-8",
"string": ""
},
Expand All @@ -12,44 +13,99 @@
"*/*"
],
"Accept-Encoding": [
"gzip, deflate, compress"
"gzip, deflate"
],
"Connection": [
"keep-alive"
],
"User-Agent": [
"python-requests/2.2.1 CPython/3.5.2 Darwin/17.3.0"
"python-requests/2.28.1"
]
},
"method": "GET",
"uri": "https://stxnext.com/static/img/logo.830ebe551641.svg"
"uri": "https://upload.wikimedia.org/wikipedia/commons/d/d3/Fluent_Emoji_high_contrast_1f604.svg"
},
"response": {
"body": {
"base64_string": "H4sIAAAAAAAAA32Vy24cNxBF9/4KorPnsIqPYgUeL8KNN/4B7wJY1ghQJCMeePz5ucVulp2BYUjQ6DZZr8vTnLdfvz2G29On6+W8ZU5buDw8PV6uh/j29HD76/X7eUshhcz43cLnp+fn8/by+vKwhe//PL98PW+X6/XLn6fT7XaLtxxf/308cUrphNTbuzdvv/x9vYRP5+0DtcB1CP4ECRD25z2eQM+lsP75uKr8wWQ/2+nnNBpz6doCpVgI4Ropq5DpVlINGhNrK6a15BZ61E4V+ymSJh09dmlUTEvOWM6VOBDH1CVI7EmT2CKi2pDIrencjCgOLSqxkmmEZexP1JEFxRBI2E+p7c3lmm09c+eGplpteeaXWsmabIkymimVm6KLkpEOs6HVEvqcThULA6Wa1mrPOFb0MGMIMmPyKpark7YB3QQhah/FljVhu7Uiu+x1ys5dB5WYROekWbItC9kyBtW0Jxfafah5oHSzPs2mGcUYVOf2PQzPqcxsCKMx49J+CJJl969On1rr2XSrMrsp3OeQpfVqmpn2wyqEuOROUMJR99LUzMGQFcbqDLBG76j4PUIMS4qyIwRNxQGCAkHqAJEaC90BggYLDhAkUCiLIOpGQnaCoLkJO0EkQCizE4R1INScIGhKuzOTIGggVJ0gyy+1O0EoDxycIBuNKmRgijUl4DKYjSCxZ9kIyo4QF0NIHSHo1hFzIAQJhMpCyGSvxRHiajDoQgjLYKE4QpZcKDtDKN7YmDoYggZDxRmCBkPqDKFtMCTOEDQmb86QjVWlOEPQYEicIWgwZOfoXoAhGNTL9Ne8qnxAZwzdYfF7hjBsy4VDRXEWuymm/Whp1qSY1N6LQDWqdjyxyppwF1CYNpfuuxnXTC7Zc7FGgSU4JhJBgxmRKpNAzfh0veceSxu5mPuIhp841B/ZucUqdXhxe2WA92rrLunSY42y1o9Bj+hlw0oO63FReG06enIfBvkUa++a8s7Rjx+a9T0vXRGpOsBTqjpv+K5EIRtKeDma/bessPcRVzaFtdswshdzZQO1zImHXfypd7OnUp8vZG0dDff/+3BoO76CLxZfN5xxG3k88qJ/8vx4ji671/e8R393dYbrY6YVv6Zd+Zcbq36JRbTOc5z95R8nONZM+9ecTbt233n7S9btG/zdm/8AQ3TyAiMIAAA=",
"encoding": null,
"string": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"-16169 -10492.84 144.98 39.947\"><defs><style>.a{fill:url(#a);}</style><linearGradient id=\"a\" x2=\"1\" y2=\"1\" gradientUnits=\"objectBoundingBox\"><stop offset=\"0\" stop-color=\"#15c9c2\"/><stop offset=\"1\" stop-color=\"#39769b\"/></linearGradient></defs><path class=\"a\" d=\"M88.841,54.948V48.514a3.665,3.665,0,0,1,1.541-.336,2.169,2.169,0,0,1,2.266,2.435A2.182,2.182,0,0,1,90.435,53.1a2.9,2.9,0,0,1-.85-.125v1.974Zm.744-6.019v3.46a2.558,2.558,0,0,0,.8.125c1,0,1.523-.807,1.523-1.9s-.525-1.84-1.506-1.84h-.041A1.986,1.986,0,0,0,89.585,48.929ZM62.838,54.948l.717-1.9-1.788-4.769h.805l1.187,3.472a5.008,5.008,0,0,1,.167.682h.019a5.01,5.01,0,0,1,.167-.682l1.177-3.472h.815l-2.5,6.672Zm-5.749,0V48.514a3.669,3.669,0,0,1,1.541-.336A2.169,2.169,0,0,1,60.9,50.613,2.185,2.185,0,0,1,58.683,53.1a2.9,2.9,0,0,1-.85-.125v1.974Zm.74-6.019v3.46a2.558,2.558,0,0,0,.8.125c1,0,1.523-.807,1.523-1.9s-.529-1.84-1.513-1.84H58.6A1.986,1.986,0,0,0,57.829,48.929Zm79.213,4.213a2.19,2.19,0,0,1-2.282-2.487c0-1.462.788-2.478,2.08-2.478a1.825,1.825,0,0,1,1.9,2.044c0,.1,0,.205-.008.318l-3.257.469a1.5,1.5,0,0,0,1.6,1.532,2.886,2.886,0,0,0,1.3-.292l.23.557a3.431,3.431,0,0,1-1.484.336ZM135.432,50.5l2.6-.366c-.011-.944-.488-1.386-1.2-1.386C135.989,48.744,135.45,49.416,135.432,50.5ZM130.4,52.8l.265-.567a2.665,2.665,0,0,0,1.143.3c.611,0,1.018-.3,1.018-.77,0-.5-.407-.7-.965-.9-.673-.248-1.336-.549-1.336-1.408,0-.744.575-1.279,1.585-1.279a2.6,2.6,0,0,1,1.327.336l-.257.523a2.054,2.054,0,0,0-1-.283c-.576,0-.9.309-.9.707,0,.5.388.682.913.875.708.265,1.4.549,1.4,1.434.006.823-.649,1.372-1.772,1.372A3.261,3.261,0,0,1,130.4,52.8Zm-3.008.34c-1.187,0-1.841-.523-1.841-1.672V48.276h.744v3.2c0,.707.366,1.043,1.1,1.043a2.914,2.914,0,0,0,1.008-.158V48.276h.73V52.8a4.263,4.263,0,0,1-1.664.34Zm-7.256-2.487c0-1.417.708-2.478,2.028-2.478s2.026,1.061,2.026,2.478-.709,2.487-2.026,2.487S120.14,52.071,120.14,50.655Zm.735-.007c0,1.1.424,1.884,1.292,1.884s1.291-.788,1.291-1.884-.425-1.866-1.291-1.866v0C121.3,48.779,120.875,49.549,120.875,50.648Zm-12.187,2.494a2.19,2.19,0,0,1-2.282-2.487c0-1.462.788-2.478,2.08-2.478a1.825,1.825,0,0,1,1.9,2.044c0,.1,0,.205-.009.318l-3.256.469a1.494,1.494,0,0,0,1.6,1.532,2.886,2.886,0,0,0,1.3-.292l.23.557a3.431,3.431,0,0,1-1.484.336ZM107.079,50.5l2.6-.366c-.01-.944-.488-1.386-1.2-1.386C107.636,48.744,107.1,49.416,107.079,50.5Zm-13.249.159c0-1.417.708-2.478,2.028-2.478s2.026,1.061,2.026,2.478-.707,2.487-2.026,2.487S93.83,52.071,93.83,50.655Zm.735-.007c0,1.1.424,1.884,1.292,1.884s1.291-.788,1.291-1.884-.424-1.866-1.291-1.866v0C94.989,48.779,94.565,49.549,94.565,50.648Zm-18.973.007c0-1.417.708-2.478,2.028-2.478s2.032,1.061,2.032,2.478-.715,2.487-2.032,2.487S75.592,52.071,75.592,50.655Zm.735-.007c0,1.1.424,1.884,1.292,1.884s1.292-.788,1.292-1.884-.426-1.866-1.292-1.866v0C76.752,48.779,76.328,49.549,76.328,50.648ZM68.85,53.1a1.149,1.149,0,0,1-1.257-1.292V48.833H66.9v-.557h.688V47.123l.716-.239v1.389h1.027v.557H68.306v2.939a.634.634,0,0,0,.716.673,1.006,1.006,0,0,0,.309-.044v.619a1.308,1.308,0,0,1-.453.081Zm15.078-.053V49.823c0-.638-.39-1.044-1.158-1.044a2.968,2.968,0,0,0-1.018.169v4.1h-.745V48.513a4.5,4.5,0,0,1,1.753-.336c1.257,0,1.9.584,1.9,1.585v3.289Zm34.114-3.212c0-.7-.461-1.037-1.187-1.037a2.036,2.036,0,0,0-.989.265v3.983h-.744V46.1h.744v2.376A2.616,2.616,0,0,1,117,48.191c1.1,0,1.778.557,1.778,1.585v3.265l-.734,0Zm-6.285,3.212V48.513a4.493,4.493,0,0,1,1.743-.336,3.273,3.273,0,0,1,.47.034l-.143.621a2.031,2.031,0,0,0-.424-.034,2.461,2.461,0,0,0-.9.15v4.1Zm-8.485,0-.974-3.327a5.884,5.884,0,0,1-.14-.654h-.019s-.062.354-.15.654l-.974,3.327h-.753l-1.45-4.769h.744l.93,3.371a7.42,7.42,0,0,1,.15.732h.019s.07-.407.158-.732l.974-3.371h.709l.966,3.371c.088.318.167.732.167.732h.019a6.418,6.418,0,0,1,.143-.732l.947-3.371h.731l-1.442,4.769ZM73.5,49.833c0-.7-.461-1.037-1.187-1.037a2.044,2.044,0,0,0-.991.265v3.983h-.744V46.1h.744v2.376a2.612,2.612,0,0,1,1.133-.283c1.1,0,1.778.557,1.778,1.585v3.265l-.734,0Zm-27.141-6,8.837-14.534L46.91,15.475h7.926l7.925,13.819L54.32,43.828Zm-15.478,0V21.688H23.911V15.474H44.819v6.213H37.846V43.828ZM0,40.086l4.455-4.463c1.473,1.473,4.064,1.99,6.331,1.99,2.741,0,4.062-.913,4.062-2.548a2.4,2.4,0,0,0-.548-1.671,3.133,3.133,0,0,0-1.872-.757L9,32.158A9.631,9.631,0,0,1,3.31,29.651a7.847,7.847,0,0,1-1.953-5.7C1.358,18.778,5.26,15,11.712,15c4.06,0,7.127.956,9.558,3.385l-4.387,4.385C15.092,20.98,12.742,21.1,11.506,21.1c-2.429,0-3.424,1.394-3.424,2.63a1.868,1.868,0,0,0,.557,1.315,3.179,3.179,0,0,0,1.952.836l3.426.48a9.569,9.569,0,0,1,5.576,2.348c1.513,1.473,2.111,3.584,2.111,6.213,0,5.761-4.982,8.907-10.95,8.907C6.412,43.828,2.866,43.031,0,40.086Zm111.6,3.73,6.958-11.665-6.518-11.076h2.81l5.048,8.975,5.046-8.975h2.812L121.2,32.15l7.027,11.658-2.812.006L119.9,34.265l-5.558,9.55Zm24.376,0V23.245h-6.579V21.074h15.588v2.171H138.4V43.814ZM95.878,21.074H109.99v2.173h-11.7v8.018h9.966v2.165H98.3v8.21H110v2.173l-14.123,0ZM90.192,43.814,78.12,25.571V43.808H75.692V21.074h2.3L90.069,39.247V21.074H92.5V43.814ZM63.528,43.8l-2.683-5.029,3.7-6.344,6.611,11.379Zm-2.7-24.291,2.094-4.046h7.919L64.668,26.125Z\" transform=\"translate(-16169 -10507.84)\"/></svg>"
"string": ""
},
"headers": {
"accept-ranges": [
"bytes"
],
"access-control-allow-origin": [
"*"
],
"access-control-expose-headers": [
"Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache"
],
"age": [
"3455"
],
"content-encoding": [
"gzip"
],
"content-length": [
"5177"
"887"
],
"content-type": [
"image/svg+xml"
],
"date": [
"Thu, 04 Jan 2018 23:00:15 GMT"
"Fri, 28 Apr 2023 18:12:28 GMT"
],
"etag": [
"W/1c8686c8e5d2d97ddd0a0373c24f9e20"
],
"last-modified": [
"Wed, 22 Nov 2017 09:22:00 GMT"
"Sun, 14 Aug 2022 20:02:54 GMT"
],
"nel": [
"{ \"report_to\": \"wm_nel\", \"max_age\": 604800, \"failure_fraction\": 0.05, \"success_fraction\": 0.0}"
],
"report-to": [
"{ \"group\": \"wm_nel\", \"max_age\": 604800, \"endpoints\": [{ \"url\": \"https://intake-logging.wikimedia.org/v1/events?stream=w3c.reportingapi.network_error&schema_uri=/w3c/reportingapi/network_error/1.0.0\" }] }"
],
"server": [
"ATS/9.1.4"
],
"server-timing": [
"cache;desc=\"hit-front\", host;desc=\"cp6007\""
],
"strict-transport-security": [
"max-age=0; includeSubdomains; preload"
"max-age=106384710; includeSubDomains; preload"
],
"timing-allow-origin": [
"*"
],
"vary": [
"Accept-Encoding"
],
"x-cache": [
"cp6003 miss, cp6007 hit/7"
],
"x-cache-status": [
"hit-front"
],
"x-client-ip": [
"2a01:cb22:187:5a00:edf1:b272:837:2451"
],
"x-content-type-options": [
"nosniff"
],
"x-object-meta-sha1base36": [
"cqyxm9vlybfdqxp6nd43kcm5iayungc"
]
},
"status": {
"code": 200,
"message": "OK"
},
"url": "https://stxnext.com/static/img/logo.830ebe551641.svg"
"url": "https://upload.wikimedia.org/wikipedia/commons/d/d3/Fluent_Emoji_high_contrast_1f604.svg"
}
}
],
"recorded_with": "betamax/0.8.0"
"recorded_with": "betamax/0.8.2"
}
Loading

0 comments on commit 46ed438

Please sign in to comment.