Skip to content

Commit

Permalink
test: fix failing tests #314
Browse files Browse the repository at this point in the history
  • Loading branch information
VKTB committed Feb 10, 2022
1 parent 393156a commit 35569fb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions test/search_api/endpoints/test_get_entity_by_pid.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ class TestSearchAPIGetByPIDEndpoint:
),
pytest.param(
"instruments",
"2",
"pid:2",
"{}",
{
"pid": "2",
"pid": "pid:2",
"name": "INSTRUMENT 2",
"facility": "LILS",
"datasets": [],
Expand Down
6 changes: 3 additions & 3 deletions test/search_api/endpoints/test_search_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ class TestSearchAPISearchEndpoint:
"datasets": [],
"facility": "LILS",
"name": "INSTRUMENT 1",
"pid": "1",
"pid": "pid:1",
},
{
"datasets": [],
"facility": "LILS",
"name": "INSTRUMENT 2",
"pid": "2",
"pid": "pid:2",
},
],
id="Basic /instruments request",
Expand Down Expand Up @@ -190,7 +190,7 @@ class TestSearchAPISearchEndpoint:
"datasets": [],
"facility": "LILS",
"name": "INSTRUMENT 10",
"pid": "10",
"pid": "pid:10",
},
],
id="Search instruments with name condition",
Expand Down
8 changes: 4 additions & 4 deletions test/search_api/test_nested_where_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,16 @@ def test_str_filters(self, lhs, rhs, joining_operator, expected_where_clause):
pytest.param(
[
SearchAPIWhereFilter("title", "test name", "eq"),
SearchAPIWhereFilter("pid", 10, "lt"),
SearchAPIWhereFilter("pid", "test doi", "like"),
],
[
SearchAPIWhereFilter("pid", 3, "gt"),
SearchAPIWhereFilter("doi", "doi test", "neq"),
SearchAPIWhereFilter("summary", "Test Summary", "like"),
],
"AND",
SearchAPIQuery("Document"),
"(o.name = 'test name' AND o.doi < '10' AND o.doi > '3' AND o.summary"
" like '%Test Summary%')",
"(o.name = 'test name' AND o.doi like '%test doi%' AND o.doi != "
"'doi test' AND o.summary like '%Test Summary%')",
id="Multiple filters on LHS and RHS",
),
],
Expand Down

0 comments on commit 35569fb

Please sign in to comment.