From b7fd505da41ffb4f994e4b34e42402ae552e6c61 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 25 Nov 2026 19:49:37 +0000 Subject: [PATCH] test(web-app-openpost): keep the malformed-host test URLs out of the URL probe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test_urls_reachable.py probes every literal URL and fails hard on one it cannot parse, and http://a..b/m.jpg in the malformed-media-host tests of test_service.py and test_web.py is unparsable on purpose (PR 2951 run 45676116645, LocationParseError). Both lines carry the repository's per-line nocheck url marker. 🎯 Fix: 97 % 💥 Break: 1 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 96 🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 % Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 --- .../roles/web-app-openpost/files/crossposter/test_service.py | 2 +- .../python/roles/web-app-openpost/files/crossposter/test_web.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/python/roles/web-app-openpost/files/crossposter/test_service.py b/tests/unit/python/roles/web-app-openpost/files/crossposter/test_service.py index 73399f67b9..0518e25a45 100644 --- a/tests/unit/python/roles/web-app-openpost/files/crossposter/test_service.py +++ b/tests/unit/python/roles/web-app-openpost/files/crossposter/test_service.py @@ -474,7 +474,7 @@ class TestDelivery(ServiceFixture, unittest.TestCase): self.assertEqual({row["state"] for row in database.items}, {"drafted"}) def test_a_malformed_media_host_fails_the_delivery_not_the_service(self) -> None: - for url in ("http://%00/m.jpg", "http://a..b/m.jpg"): + for url in ("http://%00/m.jpg", "http://a..b/m.jpg"): # nocheck: url with self.subTest(url=url): runner, database, _ = self.build("review", [picture(101, url)]) database.cursors["press"] = "100" diff --git a/tests/unit/python/roles/web-app-openpost/files/crossposter/test_web.py b/tests/unit/python/roles/web-app-openpost/files/crossposter/test_web.py index 8fa0d9f341..f8bf30bd22 100644 --- a/tests/unit/python/roles/web-app-openpost/files/crossposter/test_web.py +++ b/tests/unit/python/roles/web-app-openpost/files/crossposter/test_web.py @@ -178,7 +178,7 @@ class TestRefusedUrls(unittest.TestCase): def test_a_malformed_host_is_a_request_error(self) -> None: with tempfile.TemporaryDirectory() as folder: - for url in ("http://%00/m.jpg", "http://a..b/m.jpg"): + for url in ("http://%00/m.jpg", "http://a..b/m.jpg"): # nocheck: url with self.subTest(url=url), self.assertRaises(web.RequestError): web.download(url, {}, Path(folder) / "m.jpg")