Exemplo n.º 1
0
def test_index(client):
    get(client, url="/assets/css/custom.css")
    get(client, url="/assets/img/logo.png")
    get(client, url="/assets/ico/favicon.ico")
Exemplo n.º 2
0
def test_csv(client):
    f = response2csv(get(client, url="/csv"), index_col=0)
    pt.assert_frame_equal(f, frame)
Exemplo n.º 3
0
def test_json(client):
    f = response2json(get(client, url="/json"), orient="table")
    pt.assert_frame_equal(f, frame)
Exemplo n.º 4
0
def test_get(client):
    data = get(client, url="/hello").data
    assert data.decode() == "Hello World!"
Exemplo n.º 5
0
def test_reference(client):
    response = get(client=client, url="/whoosh/json").data.decode()
    frame = read("whoosh.csv", index_col=0,
                 header=0)[["content", "group", "path", "title"]]
    pt.assert_frame_equal(
        pd.read_json(response, orient="table")[frame.keys()], frame)
Exemplo n.º 6
0
def test_app(client):
    get(client, url="/whoosh/json")
    get(client, url="/whoosh/html")
Exemplo n.º 7
0
def test_index(client):
    get(client, url="/admin")
    get(client, url="/whoosh/html")
    get(client, url="/whoosh/json")
Exemplo n.º 8
0
def test_wrong_address(client):
    with pytest.raises(AssertionError):
        get(client, url="/I_dunno")