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