1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Add new accept headers

This commit is contained in:
Donald Stufft 2022-06-25 14:54:02 -04:00
parent 21a99e4b87
commit 9c98346df9

View file

@ -33,6 +33,15 @@ from pip._internal.network.session import PipSession
from tests.lib import TestData, make_test_link_collector
ACCEPT = ", ".join(
[
"application/vnd.pypi.simple.v1+json",
"application/vnd.pypi.simple.v1+html; q=0.1",
"text/html; q=0.01",
]
)
@pytest.mark.parametrize(
"url",
[
@ -143,7 +152,7 @@ def test_get_simple_response_archive_to_http_scheme_is_html(
mock.call.get(
url,
headers={
"Accept": "text/html",
"Accept": ACCEPT,
"Cache-Control": "max-age=0",
},
),
@ -189,7 +198,7 @@ def test_get_simple_response_no_head(
mock.call(
url,
headers={
"Accept": "text/html",
"Accept": ACCEPT,
"Cache-Control": "max-age=0",
},
),