whitenoise: test_get_brotli failed in whitenoise 4.1.3

I am getting the following test failures with the new release:

======================================================================
ERROR: test_get_brotli (tests.test_django_whitenoise.DjangoWhiteNoiseTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/python-whitenoise/src/whitenoise-4.1.3/tests/test_django_whitenoise.py", line 94, in test_get_brotli
    self.assertEqual(brotli.decompress(response.content), self.static_files.js_content)
brotli.error: BrotliDecompress failed

----------------------------------------------------------------------

Test environment contains the following Arch Linux x86_64 packages:

Packages (13) python-appdirs-1.4.3-2  python-chardet-3.0.4-2  python-idna-2.8-1  python-packaging-19.0-1  python-pyparsing-2.4.0-1
              python-pytz-2019.1-1  python-six-1.12.0-1  python-sqlparse-0.2.4-2  python-urllib3-1.25.3-1  python-brotli-1.0.7-1
              python-django-2.2.3-1  python-requests-2.22.0-1  python-setuptools-1:41.0.1-1

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (8 by maintainers)

Commits related to this issue

Most upvoted comments

@evansd works for me, I managed to get a successful scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=37843426

I can submit the updated spec to get the successful build into the distro as soon as 4.1.4 is tagged. Thanks a lot for your help 😃

@evansd It looks like the issue no longer occurs on master with https://github.com/evansd/whitenoise/commit/ca6714490aa5d8143d1e96ca6f7fbf7de7482e5f.

Would it be possible to tag and ship a release with this commit ? It’ll allow me to fix the chain of failed builds in Fedora.

Thanks !

I am able to reproduce the issue on both Fedora and Ubuntu with the following:

#!/bin/bash
rm -rf /tmp/test
mkdir -p /tmp/test
python3 -m venv /tmp/test/venv
source /tmp/test/venv/bin/activate

pip install whitenoise
pip install requests
pip install Django
pip install "coverage<4.3"
pip install brotli

git clone https://github.com/evansd/whitenoise /tmp/test/whitenoise

pushd /tmp/test/whitenoise
export DJANGO_SETTINGS_MODULE=tests.django_settings
python3 -m unittest discover
popd

However, on these same systems, running the tests from source with tox doesn’t return any failures. I don’t know why yet but I’m out of time for this issue today, will continue looking when I have a chance.