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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user