def integration_test_with_hosted_file():
    with LiveServer() as liveserver:
        liveserver.create_hosted_file("pyassert-0.1.2.tar.gz")

        index_page = download(liveserver.url + "simple/")

        assert_that(index_page).contains("pyassert")
def integration_test_with_hosted_file():
    with LiveServer() as liveserver:
        liveserver.create_hosted_file("pyassert-0.1.2.tar.gz")

        index_page = download(liveserver.url + "simple/")

        assert_that(index_page).contains("pyassert")
def integration_test():
    with StaticPyPiServer():
        with LiveServer() as liveserver:
            versions_page = download(liveserver.url + "simple/yadt/")

            assert_that(versions_page).contains("0.1.2").contains(
                "1.2.3").contains("2.3.4")
def integration_test_with_hosted_file():
    with LiveServer() as liveserver:
        liveserver.create_hosted_file("yadt-1.2.3.tar.gz")

        actual_content = download(liveserver.url + "package/yadt/1.2.3/yadt-1.2.3.tar.gz")

        assert_that(actual_content).is_equal_to("hosted content")
def integration_test():
    with StaticPyPiServer():
        with LiveServer() as liveserver:
            actual_content = download(liveserver.url +
                                      "package/yadt/1.2.3/yadt-1.2.3.tar.gz")

            assert_that(actual_content).is_equal_to("static content")
def integration_test_with_hosted_file():
    with LiveServer() as liveserver:
        liveserver.create_hosted_file("yadt-1.2.3.tar.gz")

        actual_content = download(liveserver.url +
                                  "package/yadt/1.2.3/yadt-1.2.3.tar.gz")

        assert_that(actual_content).is_equal_to("hosted content")
def integration_test_with_cached_file():
    with StaticPyPiServer():
        with LiveServer() as liveserver:
            liveserver.create_cached_file("yadt-5.4.3.tar.gz")

            versions_page = download(liveserver.url + "simple/yadt/")

            assert_that(versions_page).contains("0.1.2").contains("1.2.3").contains("2.3.4").does_not_contain("5.4.3")
def integration_test_with_cached_file():
    with StaticPyPiServer():
        with LiveServer() as liveserver:
            liveserver.create_cached_file("yadt-5.4.3.tar.gz")

            versions_page = download(liveserver.url + "simple/yadt/")

            assert_that(versions_page).contains("0.1.2").contains(
                "1.2.3").contains("2.3.4").does_not_contain("5.4.3")
def integration_test_with_hosted_and_cached_file():
    with LiveServer() as liveserver:
        liveserver.create_cached_file("pyfix-0.1.2.tar.gz")
        liveserver.create_cached_file("pyassert-0.1.2.tar.gz")
        liveserver.create_hosted_file("committer-0.0.60.tar.gz")

        index_page = download(liveserver.url + "simple/")

        assert_that(index_page).contains("committer").contains("pyfix").contains("pyassert")
def integration_test_with_cached_file():
    with StaticPyPiServer():
        with LiveServer() as liveserver:
            liveserver.create_cached_file("pyassert-0.1.2.tar.gz")

            index_page = download(liveserver.url + "simple/")

            assert_that(index_page).contains("public-a").contains("public-b").contains("public-c")
            assert_that(index_page).does_not_contain("pyassert")
def integration_test_with_cached_files():
    with LiveServer() as liveserver:
        liveserver.create_cached_file("pyassert-0.1.2.tar.gz")
        liveserver.create_cached_file("pyassert-1.2.3.tar.gz")
        liveserver.create_cached_file("pyassert-2.3.4.tar.gz")

        index_page = download(liveserver.url + "simple/pyassert/")

        assert_that(index_page).contains("0.1.2").contains("1.2.3").contains("2.3.4")
def integration_test_with_cached_files():
    with LiveServer() as liveserver:
        liveserver.create_cached_file("pyassert-0.1.2.tar.gz")
        liveserver.create_cached_file("pyassert-1.2.3.tar.gz")
        liveserver.create_cached_file("pyassert-2.3.4.tar.gz")

        index_page = download(liveserver.url + "simple/pyassert/")

        assert_that(index_page).contains("0.1.2").contains("1.2.3").contains(
            "2.3.4")
def integration_test_with_hosted_and_cached_file():
    with LiveServer() as liveserver:
        liveserver.create_cached_file("pyfix-0.1.2.tar.gz")
        liveserver.create_cached_file("pyassert-0.1.2.tar.gz")
        liveserver.create_hosted_file("committer-0.0.60.tar.gz")

        index_page = download(liveserver.url + "simple/")

        assert_that(index_page).contains("committer").contains(
            "pyfix").contains("pyassert")
def integration_test_with_hosted_and_cached_file():
    with StaticPyPiServer():
        with LiveServer() as liveserver:
            liveserver.create_cached_file("schnulli-0.1.2.tar.gz")
            liveserver.create_hosted_file("committer-0.0.60.tar.gz")

            index_page = download(liveserver.url + "simple/")

            assert_that(index_page).contains("public-a").contains("public-b").contains("public-c").contains("committer")
            assert_that(index_page).does_not_contain("schnulli")
def integration_test_with_hosted_and_cached_files():
    with LiveServer() as liveserver:
        liveserver.create_cached_file("pyassert-9.8.5.tar.gz")
        liveserver.create_cached_file("pyassert-8.7.4.tar.gz")
        liveserver.create_cached_file("pyassert-7.6.5.tar.gz")
        liveserver.create_hosted_file("pyassert-0.1.2.tar.gz")
        liveserver.create_hosted_file("pyassert-1.2.3.tar.gz")
        liveserver.create_hosted_file("pyassert-2.3.4.tar.gz")

        index_page = download(liveserver.url + "simple/pyassert/")

        assert_that(index_page).contains("0.1.2").contains("1.2.3").contains("2.3.4")\
            .does_not_contain("9.8.7").does_not_contain("8.7.6").does_not_contain("7.6.5")
def integration_test_with_hosted_and_cached_files():
    with LiveServer() as liveserver:
        liveserver.create_cached_file("pyassert-9.8.5.tar.gz")
        liveserver.create_cached_file("pyassert-8.7.4.tar.gz")
        liveserver.create_cached_file("pyassert-7.6.5.tar.gz")
        liveserver.create_hosted_file("pyassert-0.1.2.tar.gz")
        liveserver.create_hosted_file("pyassert-1.2.3.tar.gz")
        liveserver.create_hosted_file("pyassert-2.3.4.tar.gz")

        index_page = download(liveserver.url + "simple/pyassert/")

        assert_that(index_page).contains("0.1.2").contains("1.2.3").contains("2.3.4")\
            .does_not_contain("9.8.7").does_not_contain("8.7.6").does_not_contain("7.6.5")
def integration_test():
    with LiveServer() as liveserver:
        liveserver.create_hosted_file("pyassert-0.1.2.tar.gz")
        liveserver.create_hosted_file("pyassert-1.2.3.tar.gz")
        liveserver.create_hosted_file("pyassert-2.3.4.tar.gz")

        index_page = download(liveserver.url + "simple/pyassert/")

        assert_that(index_page).starts_with("<!doctype html>\n<html>") \
                            .contains("<h1>Links for pyassert</h1>") \
                            .contains("<a href=\"/package/pyassert/2.3.4/pyassert-2.3.4.tar.gz\">pyassert-2.3.4.tar.gz</a><br/>") \
                            .contains("<a href=\"/package/pyassert/0.1.2/pyassert-0.1.2.tar.gz\">pyassert-0.1.2.tar.gz</a><br/>") \
                            .contains("<a href=\"/package/pyassert/1.2.3/pyassert-1.2.3.tar.gz\">pyassert-1.2.3.tar.gz</a><br/>") \
                            .ends_with("</html>")
def integration_test():
    with StaticPyPiServer():
        with LiveServer() as liveserver:
            liveserver.create_hosted_file("yadt-1.2.3.tar.gz")

            index_page = download(liveserver.url + "simple/")

            assert_that(index_page).starts_with("<!doctype html>\n<html>") \
                            .contains("<h1>List of Packages</h1>") \
                            .contains("<a href=\"/simple/public-a\">public-a</a><br/>") \
                            .contains("<a href=\"/simple/public-b\">public-b</a><br/>") \
                            .contains("<a href=\"/simple/public-c\">public-c</a><br/>") \
                            .contains("<a href=\"/simple/yadt\">yadt</a><br/>") \
                            .ends_with("</html>")
def integration_test():
    with LiveServer() as liveserver:
        liveserver.create_hosted_file("pyassert-0.1.2.tar.gz")
        liveserver.create_hosted_file("pyassert-1.2.3.tar.gz")
        liveserver.create_hosted_file("pyassert-2.3.4.tar.gz")

        index_page = download(liveserver.url + "simple/pyassert/")

        assert_that(index_page).starts_with("<!doctype html>\n<html>") \
                            .contains("<h1>Links for pyassert</h1>") \
                            .contains("<a href=\"/package/pyassert/2.3.4/pyassert-2.3.4.tar.gz\">pyassert-2.3.4.tar.gz</a><br/>") \
                            .contains("<a href=\"/package/pyassert/0.1.2/pyassert-0.1.2.tar.gz\">pyassert-0.1.2.tar.gz</a><br/>") \
                            .contains("<a href=\"/package/pyassert/1.2.3/pyassert-1.2.3.tar.gz\">pyassert-1.2.3.tar.gz</a><br/>") \
                            .ends_with("</html>")
def integration_test():
    with StaticPyPiServer():
        with LiveServer() as liveserver:
            liveserver.create_hosted_file("yadt-1.2.3.tar.gz")

            index_page = download(liveserver.url + "simple/")

            assert_that(index_page).starts_with("<!doctype html>\n<html>") \
                            .contains("<h1>List of Packages</h1>") \
                            .contains("<a href=\"/simple/public-a\">public-a</a><br/>") \
                            .contains("<a href=\"/simple/public-b\">public-b</a><br/>") \
                            .contains("<a href=\"/simple/public-c\">public-c</a><br/>") \
                            .contains("<a href=\"/simple/yadt\">yadt</a><br/>") \
                            .ends_with("</html>")
def integration_test():
    with StaticPyPiServer():
        with LiveServer() as liveserver:
            actual_content = download(liveserver.url + "package/yadt/1.2.3/yadt-1.2.3.tar.gz")

            assert_that(actual_content).is_equal_to("static content")
def integration_test():
    with StaticPyPiServer():
        with LiveServer() as liveserver:
            versions_page = download(liveserver.url + "simple/yadt/")

            assert_that(versions_page).contains("0.1.2").contains("1.2.3").contains("2.3.4")
def integration_test():
    with StaticPyPiServer():
        with LiveServer() as liveserver:
            index_page = download(liveserver.url + "simple/")

            assert_that(index_page).contains("public-a").contains("public-b").contains("public-c")