From 00fb2729e4f31b9bb3063e3b11338ad7e831eec8 Mon Sep 17 00:00:00 2001 From: Mondo Diaz Date: Fri, 30 Jan 2026 08:51:30 -0600 Subject: [PATCH] Fix test_rewrite_relative_links assertion to expect correct URL The test was checking for the wrong URL pattern. When urljoin resolves ../../packages/ab/cd/... relative to /api/pypi/pypi-remote/simple/requests/, it correctly produces /api/pypi/pypi-remote/packages/ab/cd/... (not /api/pypi/packages/...). --- backend/tests/integration/test_pypi_proxy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/tests/integration/test_pypi_proxy.py b/backend/tests/integration/test_pypi_proxy.py index d5c2ca2..4bfdd4c 100644 --- a/backend/tests/integration/test_pypi_proxy.py +++ b/backend/tests/integration/test_pypi_proxy.py @@ -106,7 +106,8 @@ class TestPyPILinkRewriting: ) # The relative URL should be resolved to absolute - assert "upstream=https%3A%2F%2Fartifactory.example.com%2Fapi%2Fpypi%2Fpackages" in result + # ../../packages/ab/cd/... from /api/pypi/pypi-remote/simple/requests/ resolves to /api/pypi/pypi-remote/packages/ab/cd/... + assert "upstream=https%3A%2F%2Fartifactory.example.com%2Fapi%2Fpypi%2Fpypi-remote%2Fpackages" in result # Hash fragment should be preserved assert "#sha256=abc123" in result