X-Git-Url: https://git.jsancho.org/?p=datasette-pytables.git;a=blobdiff_plain;f=tests%2Ftest_api.py;h=39c41228019dfbebb53c84803dc7ffa05d29ebb9;hp=86f0b23b0d2b7ce38b09de9839d67efc71c79823;hb=b3ecaa0810240531236a9b89d74d0c6b07346f83;hpb=33d28d65d042098544a3aff3763beebe825b60d7 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'])