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