Skip to content

Commit 9c98346

Browse files
committed
Add new accept headers
1 parent 21a99e4 commit 9c98346

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/unit/test_collector.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@
3333
from tests.lib import TestData, make_test_link_collector
3434

3535

36+
ACCEPT = ", ".join(
37+
[
38+
"application/vnd.pypi.simple.v1+json",
39+
"application/vnd.pypi.simple.v1+html; q=0.1",
40+
"text/html; q=0.01",
41+
]
42+
)
43+
44+
3645
@pytest.mark.parametrize(
3746
"url",
3847
[
@@ -143,7 +152,7 @@ def test_get_simple_response_archive_to_http_scheme_is_html(
143152
mock.call.get(
144153
url,
145154
headers={
146-
"Accept": "text/html",
155+
"Accept": ACCEPT,
147156
"Cache-Control": "max-age=0",
148157
},
149158
),
@@ -189,7 +198,7 @@ def test_get_simple_response_no_head(
189198
mock.call(
190199
url,
191200
headers={
192-
"Accept": "text/html",
201+
"Accept": ACCEPT,
193202
"Cache-Control": "max-age=0",
194203
},
195204
),

0 commit comments

Comments
 (0)