1
0
mirror of https://github.com/pypiserver/pypiserver synced 2024-11-09 16:45:51 +01:00

test that root view returns absolute paths in hrefs

this is github issue 25
This commit is contained in:
Ralf Schmitt 2012-12-02 23:07:48 +01:00
parent be52ec1c40
commit 7a999fb8cb

@ -168,3 +168,10 @@ def test_nonroot_simple_packages(root, testpriv):
links = resp.html("a")
assert len(links) == 1
assert links[0]["href"] == "/priv/packages/foobar-1.0.zip"
def test_root_no_relative_paths(testpriv):
"""https://github.com/schmir/pypiserver/issues/25"""
resp = testpriv.get("/priv/")
hrefs = [x["href"] for x in resp.html("a")]
assert hrefs == ['/priv/packages/', '/priv/simple/', 'http://pypi.python.org/pypi/pypiserver']