Skip to content

Commit

Permalink
Better test for /-/open-csv-file
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Sep 2, 2021
1 parent 1608ae5 commit d43520f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_open_csv_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ async def test_open_csv_files(tmpdir):
open(path, "w").write("id,name\n123,Hello")
response = await datasette.client.post("/-/open-csv-file", json={"path": path})
assert response.status_code == 200
assert response.json()["ok"] is True
response = await datasette.client.get("/temporary/demo.json?_shape=array")
assert response.json() == [{"rowid": 1, "id": "123", "name": "Hello"}]
assert response.json() == {"ok": True, "path": "/temporary/demo", "rows": 1}
response2 = await datasette.client.get("/temporary/demo.json?_shape=array")
assert response2.json() == [{"rowid": 1, "id": "123", "name": "Hello"}]

0 comments on commit d43520f

Please sign in to comment.