From 1b142143fb27750e4745d73a5eeb12ce6267849b Mon Sep 17 00:00:00 2001 From: Viktor Bozhinov Date: Wed, 19 Jan 2022 09:33:58 +0000 Subject: [PATCH] test: test `inq` operator #297 --- .../datagateway_api/icat/filters/test_where_filter.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/datagateway_api/icat/filters/test_where_filter.py b/test/datagateway_api/icat/filters/test_where_filter.py index 4cc5ce50..703857aa 100644 --- a/test/datagateway_api/icat/filters/test_where_filter.py +++ b/test/datagateway_api/icat/filters/test_where_filter.py @@ -21,8 +21,14 @@ class TestICATWhereFilter: pytest.param("lte", 5, ["%s <= '5'"], id="less than or equal"), pytest.param("gt", 5, ["%s > '5'"], id="greater than"), pytest.param("gte", 5, ["%s >= '5'"], id="greater than or equal"), - pytest.param("in", [1, 2, 3, 4], ["%s in (1, 2, 3, 4)"], id="in a list"), - pytest.param("in", [], ["%s in (NULL)"], id="empty list"), + pytest.param( + "in", [1, 2, 3, 4], ["%s in (1, 2, 3, 4)"], id="in a list (in)", + ), + pytest.param("in", [], ["%s in (NULL)"], id="in empty list (in)"), + pytest.param( + "inq", [1, 2, 3, 4], ["%s in (1, 2, 3, 4)"], id="in a list (inq)", + ), + pytest.param("inq", [], ["%s in (NULL)"], id="in empty list (inq)"), pytest.param("between", [1, 2], ["%s between '1' and '2'"], id="between"), ], ) @@ -38,6 +44,7 @@ def test_valid_operations( "operation, value", [ pytest.param("in", "1, 2, 3, 4, 5", id="in a list (in)"), + pytest.param("inq", "1, 2, 3, 4, 5", id="in a list (inq)"), pytest.param("between", "1, 2, 3, 4, 5", id="between - string value"), pytest.param("between", [], id="between - empty list"), pytest.param(