Skip to content

Commit

Permalink
test: test nin operator #297
Browse files Browse the repository at this point in the history
  • Loading branch information
VKTB committed Jan 19, 2022
1 parent 92b5f36 commit 8d57256
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/datagateway_api/icat/filters/test_where_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ class TestICATWhereFilter:
"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(
"nin", [1, 2, 3, 4], ["%s not in (1, 2, 3, 4)"], id="not in a list",
),
pytest.param("nin", [], ["%s not in (NULL)"], id="not in empty list"),
pytest.param("between", [1, 2], ["%s between '1' and '2'"], id="between"),
],
)
Expand All @@ -45,6 +49,7 @@ def test_valid_operations(
[
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("nin", "1, 2, 3, 4, 5", id="nin"),
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 8d57256

Please sign in to comment.