コード例 #1
0
def deploying_wordpress_shows_front_page():
    with create_temporary_dir() as temp_dir:
        port = find_port()
        install_wordpress(temp_dir, port=port)
        process = subprocess.Popen(
            ["bin/httpd", "-DNO_DETACH"],
            cwd=temp_dir
        )
        try:
            assert hello_world_post_is_visible(port=port)
        finally:
            process.terminate()
コード例 #2
0
def running_apache2_after_installation_shows_default_page():
    with create_temporary_dir() as temp_dir:
        port = find_port()
        install_apache2(temp_dir, port=port)
        process = subprocess.Popen(
            ["bin/httpd", "-DNO_DETACH"],
            cwd=temp_dir
        )
        try:
            assert_default_apache_page_is_visible(port=port)
        finally:
            process.terminate()
コード例 #3
0
def php_files_are_served():
    with create_temporary_dir() as temp_dir:
        port = find_port()
        install_apache2(temp_dir, port=port)
        write_php_file(temp_dir)
        process = subprocess.Popen(
            ["bin/httpd", "-DNO_DETACH"],
            cwd=temp_dir
        )
        try:
            assert_php_file_is_visible(port=port)
        finally:
            process.terminate()
コード例 #4
0
def apachectl_has_httpd_location_updated():
    with create_temporary_dir() as temp_dir:
        port = find_port()
        install_apache2(temp_dir, port=port)
        subprocess.check_call(
            ["bin/apachectl", "start"],
            cwd=temp_dir
        )
        try:
            assert_default_apache_page_is_visible(port=port)
        finally:
            subprocess.check_call(
                ["bin/apachectl", "stop"],
                cwd=temp_dir
            )