From b3ecaa0810240531236a9b89d74d0c6b07346f83 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Tue, 29 May 2018 12:36:26 +0200 Subject: [PATCH 1/1] Tests for custom queries --- tests/test_api.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_api.py b/tests/test_api.py index 86f0b23..39c4122 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -57,14 +57,15 @@ def test_database_page(app_client): def test_custom_sql(app_client): response = app_client.get( '/test_tables.json?' + urlencode({ - 'sql': 'select identity from [/group1/table1] where speed > 100 and identity < 55', + 'sql': 'select identity from [/group1/table1] where speed > 100 and idnumber < 55', '_shape': 'objects' }), gather_request=False ) data = response.json + print("*************************", data) assert { - 'sql': 'select identity from [/group1/table1] where speed > 100 and identity < 55', + 'sql': 'select identity from [/group1/table1] where speed > 100 and idnumber < 55', 'params': {} } == data['query'] assert 4 == len(data['rows']) -- 2.39.2