projects
/
datasette-pytables.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0ba326
)
Test for non-existent tables
author
Javier Sancho
<jsf@jsancho.org>
Thu, 24 May 2018 10:26:02 +0000
(12:26 +0200)
committer
Javier Sancho
<jsf@jsancho.org>
Thu, 24 May 2018 10:26:02 +0000
(12:26 +0200)
tests/test_api.py
patch
|
blob
|
history
diff --git
a/tests/test_api.py
b/tests/test_api.py
index b48017c0cda65456cf7a27d58eebeb2c84022546..72d14b18e4dca6c1a720649d0221818cb57c76e6 100644
(file)
--- a/
tests/test_api.py
+++ b/
tests/test_api.py
@@
-106,3
+106,13
@@
def test_table_json(app_client):
'idnumber': 5,
'speed': 10.0
}]
+
+def test_table_not_exists_json(app_client):
+ assert {
+ 'ok': False,
+ 'error': 'Table not found: blah',
+ 'status': 404,
+ 'title': None,
+ } == app_client.get(
+ '/test_tables/blah.json', gather_request=False
+ ).json