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/...).
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/...).