From 5f5e1e533d98b36bbb159487984d5d95b2ff3ae2 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Thu, 24 May 2018 12:26:02 +0200 Subject: [PATCH] Test for non-existent tables --- tests/test_api.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_api.py b/tests/test_api.py index b48017c..72d14b1 100644 --- 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 -- 2.39.2