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/...).
This commit is contained in:
Mondo Diaz
2026-01-30 08:51:30 -06:00
parent 8ae4d7a685
commit 00fb2729e4

View File

@@ -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