Skip to content

Commit

Permalink
test: fix failing ne and neq operator tests #315
Browse files Browse the repository at this point in the history
  • Loading branch information
VKTB committed Feb 1, 2022
1 parent f5e3b4b commit f74efc0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/datagateway_api/icat/filters/test_where_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ class TestICATWhereFilter:
"operation, value, expected_condition_value",
[
pytest.param("eq", 5, ["%s = '5'"], id="equal"),
pytest.param("ne", 5, ["%s != 5"], id="not equal (ne)"),
pytest.param("neq", 5, ["%s != 5"], id="not equal (neq)"),
pytest.param("ne", 5, ["%s != '5'"], id="not equal (ne)"),
pytest.param("neq", 5, ["%s != '5'"], id="not equal (neq)"),
pytest.param("like", 5, ["%s like '%%5%%'"], id="like"),
pytest.param("ilike", 5, ["UPPER(%s) like UPPER('%%5%%')"], id="ilike"),
pytest.param("nlike", 5, ["%s not like '%%5%%'"], id="not like"),
Expand Down
2 changes: 1 addition & 1 deletion test/search_api/filters/test_search_api_where_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TestSearchAPIWhereFilter:
pytest.param(
SearchAPIWhereFilter("title", "My Dataset 1", "ne"),
"Dataset",
"SELECT o FROM Dataset o WHERE o.name != My Dataset 1",
"SELECT o FROM Dataset o WHERE o.name != 'My Dataset 1'",
id="WHERE filter with non-default operator",
),
pytest.param(
Expand Down

0 comments on commit f74efc0

Please sign in to comment.