forked from github.com/pypiserver
add more tests for /simple/
This commit is contained in:
parent
01a9288108
commit
cd811d131f
|
@ -98,3 +98,37 @@ def test_simple_list_no_dotfiles2(root):
|
|||
root.join(".foo-1.0.zip").write("secret")
|
||||
go("/simple/.foo/")
|
||||
assert list(showlinks()) == []
|
||||
|
||||
|
||||
def test_simple_index(root):
|
||||
root.join("foobar-1.0.zip").write("")
|
||||
root.join("foobar-1.1.zip").write("")
|
||||
root.join("foobarbaz-1.1.zip").write("")
|
||||
root.join("foobar.baz-1.1.zip").write("")
|
||||
|
||||
go("/simple/foobar")
|
||||
show()
|
||||
links = list(showlinks())
|
||||
assert len(links) == 2
|
||||
|
||||
|
||||
def test_simple_index_list(root):
|
||||
root.join("foobar-1.0.zip").write("")
|
||||
root.join("foobar-1.1.zip").write("")
|
||||
root.join("foobarbaz-1.1.zip").write("")
|
||||
root.join("foobar.baz-1.1.zip").write("")
|
||||
|
||||
go("/simple/")
|
||||
show()
|
||||
links = list(showlinks())
|
||||
assert len(links) == 3
|
||||
|
||||
|
||||
def test_simple_index_case(root):
|
||||
root.join("FooBar-1.0.zip").write("")
|
||||
root.join("FooBar-1.1.zip").write("")
|
||||
|
||||
go("/simple/foobar")
|
||||
show()
|
||||
links = list(showlinks())
|
||||
assert len(links) == 2
|
||||
|
|
Loading…
Reference in New Issue