Exemplo 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)
Exemplo 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"))
Exemplo 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"))