You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make unit tests hermetic: serve HTTP fixtures locally instead of lavr.github.io #215
Several unit tests download fixtures from the internet, so CI depends on external sites being available.
On 2026-09-28 the unit jobs failed on all Python versions because the gh-pages branch (which serves http://lavr.github.io/python-emails/tests/... via GitHub Pages) had been deleted on 2026-04-02. The branch was restored and CI is green again, but the dependency remains.
Affected tests
Fixtures from http://lavr.github.io/python-emails/tests/ (the tests/ directory of the gh-pages branch, ~800 KB):
Move the needed fixtures from gh-pages:tests/ into emails/testsuite/ (some, e.g. oldornament, already exist in emails/testsuite/loader/data).
Serve them from a local HTTP server fixture (see emails/testsuite/test_url_safety.py for an example of a threaded http.server fixture) and use its base url instead of lavr.github.io.
Since 1.1.3 the default emails.utils.url_validator rejects loopback addresses, so these tests need a fixture that sets emails.utils.url_validator = None (via monkeypatch).
Optionally keep a small number of real-network tests behind a marker (e.g. network) excluded from the default unit run.
Expected outcome
pytest -m "not e2e and not django" passes without network access.
Activity