Beispiel #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")
Beispiel #2
0
def test_csv(client):
    f = response2csv(get(client, url="/csv"), index_col=0)
    pt.assert_frame_equal(f, frame)
Beispiel #3
0
def test_json(client):
    f = response2json(get(client, url="/json"), orient="table")
    pt.assert_frame_equal(f, frame)
Beispiel #4
0
def test_get(client):
    data = get(client, url="/hello").data
    assert data.decode() == "Hello World!"
Beispiel #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)
Beispiel #6
0
def test_app(client):
    get(client, url="/whoosh/json")
    get(client, url="/whoosh/html")
Beispiel #7
0
def test_index(client):
    get(client, url="/admin")
    get(client, url="/whoosh/html")
    get(client, url="/whoosh/json")
Beispiel #8
0
def test_wrong_address(client):
    with pytest.raises(AssertionError):
        get(client, url="/I_dunno")