Skip to content

Commit eecfdd3

Browse files
committed
test: add Python 3.14 to the CI matrix
1 parent 7af8288 commit eecfdd3

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

.github/workflows/tests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ jobs:
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

tests/test_main.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff 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"]

0 commit comments

Comments
 (0)