예제 #1
0
파일: test_static.py 프로젝트: tschm/pyweb
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
파일: test_flask.py 프로젝트: tschm/pyweb
def test_csv(client):
    f = response2csv(get(client, url="/csv"), index_col=0)
    pt.assert_frame_equal(f, frame)
예제 #3
0
파일: test_flask.py 프로젝트: tschm/pyweb
def test_json(client):
    f = response2json(get(client, url="/json"), orient="table")
    pt.assert_frame_equal(f, frame)
예제 #4
0
파일: test_flask.py 프로젝트: tschm/pyweb
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")