Esempio n. 1
0
def test_inexistent_page():
    with frontik_debug.instance() as srv_port:
        try:
            with get_page(srv_port, "inexistent_page") as html:
                assert False
        except urllib2.HTTPError, e:
            assert (e.code == 404)
Esempio n. 2
0
def test_content_type_with_xsl():
    with frontik_debug.instance() as srv_port:
        assert (get_page(
            srv_port, "test_app/simple",
            xsl=True).headers["content-type"].startswith("text/html"))
Esempio n. 3
0
def test_content_type_wo_xsl():
    with frontik_debug.instance() as srv_port:
        assert (get_page(
            srv_port, "test_app/simple",
            xsl=False).headers["content-type"].startswith("application/xml"))