Update welcome.html (#278)

* Update welcome.html

* Update test_app.py
This commit is contained in:
Géry Ogam 2019-11-11 00:40:13 +01:00 committed by Matthew Planchard
parent ec7ece1ece
commit dbee4ec4ce
2 changed files with 6 additions and 6 deletions

View File

@ -4,12 +4,12 @@
<p> To use this server with pip, run the the following command:
<blockquote><pre>
pip install --extra-index-url {{URL}}simple/ PACKAGE [PACKAGE2...]
pip install --index-url {{URL}}simple/ PACKAGE [PACKAGE2...]
</pre></blockquote></p>
<p> To use this server with easy_install, run the the following command:
<blockquote><pre>
easy_install -i {{URL}}simple/ PACKAGE
easy_install --index-url {{URL}}simple/ PACKAGE [PACKAGE2...]
</pre></blockquote></p>
<p>The complete list of all packages can be found <a href="{{PACKAGES}}">here</a>

View File

@ -126,7 +126,7 @@ def test_root_count(root, testapp):
def test_root_hostname(testapp):
resp = testapp.get("/", headers={"Host": "systemexit.de"})
resp.mustcontain("easy_install -i http://systemexit.de/simple/ PACKAGE")
resp.mustcontain("easy_install --index-url http://systemexit.de/simple/ PACKAGE")
# go("http://systemexit.de/")
@ -307,18 +307,18 @@ def test_simple_index_case(root, testapp):
def test_nonroot_root(testpriv):
resp = testpriv.get("/priv/", headers={"Host": "nonroot"})
resp.mustcontain("easy_install -i http://nonroot/priv/simple/ PACKAGE")
resp.mustcontain("easy_install --index-url http://nonroot/priv/simple/ PACKAGE")
def test_nonroot_root_with_x_forwarded_host(testapp):
resp = testapp.get("/", headers={"X-Forwarded-Host": "forward.ed/priv/"})
resp.mustcontain("easy_install -i http://forward.ed/priv/simple/ PACKAGE")
resp.mustcontain("easy_install --index-url http://forward.ed/priv/simple/ PACKAGE")
resp.mustcontain("""<a href="/priv/packages/">here</a>""")
def test_nonroot_root_with_x_forwarded_host_without_trailing_slash(testapp):
resp = testapp.get("/", headers={"X-Forwarded-Host": "forward.ed/priv"})
resp.mustcontain("easy_install -i http://forward.ed/priv/simple/ PACKAGE")
resp.mustcontain("easy_install --index-url http://forward.ed/priv/simple/ PACKAGE")
resp.mustcontain("""<a href="/priv/packages/">here</a>""")