Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion requirements-testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ pysocks
socksio
httpcore[http2]
setuptools
Brotli
docker
2 changes: 2 additions & 0 deletions scripts/populate_tox/tox.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ deps =

# === Common ===
py3.8-common: hypothesis
common: brotli
common: pytest-asyncio
common: httpcore[asyncio]
# See https://github.com/pytest-dev/pytest/issues/9621
Expand All @@ -97,6 +98,7 @@ deps =
# for justification of the upper bound on pytest
{py3.6,py3.7}-gevent: pytest<7.0.0
{py3.8,py3.9,py3.10,py3.11,py3.12}-gevent: pytest
gevent: brotli
gevent: pytest-asyncio
gevent: setuptools<82
{py3.10,py3.11}-gevent: zope.event<5.0.0
Expand Down
7 changes: 6 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
from unittest import mock
from urllib.parse import parse_qs, urlparse

import brotli
try:
import brotli
except ImportError:
brotli = None

import jsonschema
import pytest
from pytest_localserver.http import WSGIServer
Expand Down Expand Up @@ -1641,6 +1645,7 @@ def __call__(self, environ, start_response):
rdr = gzip.GzipFile(fileobj=io.BytesIO(request.data))
compressed = True
elif content_encoding == "br":
assert brotli is not None
rdr = io.BytesIO(brotli.decompress(request.data))
compressed = True
else:
Expand Down
2 changes: 2 additions & 0 deletions tox.ini

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.