File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 - { python: "3.11", os: "ubuntu-latest" }
1818 - { python: "3.12", os: "ubuntu-latest" }
1919 - { python: "3.13", os: "ubuntu-latest" }
20- - { python: "3.13", os: "windows-latest" }
21- - { python: "3.13", os: "macos-latest" }
20+ - { python: "3.14", os: "ubuntu-latest" }
21+ - { python: "3.14", os: "windows-latest" }
22+ - { python: "3.14", os: "macos-latest" }
2223 steps :
2324 - name : Check out the repository
2425 uses : actions/checkout@v6
Original file line number Diff line number Diff line change @@ -27,14 +27,6 @@ def test_retrieve_called_with_auth_headers(
2727 "The import hook that typeguard uses seems to break the mock below."
2828 )
2929
30- expected_headers = {
31- "User-Agent" : f"python-requests/{ requests_version } " ,
32- "Accept-Encoding" : "gzip, deflate" ,
33- "Accept" : "*/*" ,
34- "Connection" : "keep-alive" ,
35- "Authorization" : "api-key fake-api-key-value" ,
36- }
37-
3830 with unittest .mock .patch (
3931 "stac_api_validator.validations.retrieve"
4032 ) as retrieve_mock :
@@ -50,5 +42,10 @@ def test_retrieve_called_with_auth_headers(
5042 ],
5143 )
5244 assert retrieve_mock .call_count == 1
53- r_session = retrieve_mock .call_args .args [- 1 ]
54- assert r_session .headers == expected_headers
45+ headers = retrieve_mock .call_args .args [- 1 ].headers
46+ assert headers ["Authorization" ] == "api-key fake-api-key-value"
47+ assert headers ["User-Agent" ] == f"python-requests/{ requests_version } "
48+ assert headers ["Connection" ] == "keep-alive"
49+ assert headers ["Accept" ] == "*/*"
50+ assert "gzip" in headers ["Accept-Encoding" ]
51+ assert "deflate" in headers ["Accept-Encoding" ]
You can’t perform that action at this time.
0 commit comments