Skip to content

Commit

Permalink
test: test inq operator #297
Browse files Browse the repository at this point in the history
  • Loading branch information
VKTB committed Jan 19, 2022
1 parent b0134b8 commit 1b14214
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/datagateway_api/icat/filters/test_where_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
],
)
Expand All @@ -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(
Expand Down

0 comments on commit 1b14214

Please sign in to comment.