Conversation
Unit tests downloaded fixtures from lavr.github.io (gh-pages branch) and google.com, so CI broke when gh-pages was deleted. Copy the needed fixtures into emails/testsuite/data/http and serve emails/testsuite from a session-scoped local HTTP server via the new http_fixtures fixture (which also disables url_validator to allow loopback). test_external_urls still uses real sites and is marked `network`. Closes #215 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #215
Changes
gh-pagesbranch intoemails/testsuite/data/http/(144 KB:python-logo.gif,url-fix/Пушкин А.С.jpg,sample-template/template-widgets.html+ the 7 images it references).oldornamentis served from the existingemails/testsuite/loader/data/html_import/...copy, which is byte-identical to thegh-pagesone.http_fixturesfixture inconftest.py: session-scoped local HTTP server servingemails/testsuite; returns its base url and disablesemails.utils.url_validatorfor the test (loopback is blocked by default since 1.1.3).test_loaders,test_loaders_with_params,test_loader_image_callback,test_lazy_http,test_fetch_url,test_url_fix,test_send_lettersuse the local server.test_external_urls(real HN / python.org) is markednetwork(registered insetup.cfg); CI still runs it.Testing
pytest -m "not e2e and not django and not network"→ 146 passed.pytest -m "not e2e and not django"→ 147 passed; mypy clean.After this is merged, the
gh-pagesbranch is no longer needed by the tests.🤖 Generated with Claude Code