Skip to content

Commit

Permalink
test: fix failing isPublic field endpoint tests #308
Browse files Browse the repository at this point in the history
  • Loading branch information
VKTB committed Feb 4, 2022
1 parent dc85ca4 commit c40639d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
8 changes: 2 additions & 6 deletions test/search_api/endpoints/test_count_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,14 @@ class TestSearchAPICountEndpoint:
pytest.param(
"datasets",
'{"isPublic": true}',
{"count": 479},
{"count": 462},
id="Dataset count with isPublic condition",
# Skipped because the where for isPublic doesn't work
marks=pytest.mark.skip,
),
pytest.param(
"documents",
'{"isPublic": true}',
{"count": 239},
{"count": 76},
id="Document count with isPublic condition",
# Skipped because the where for isPublic doesn't work
marks=pytest.mark.skip,
),
pytest.param(
"instruments",
Expand Down
18 changes: 15 additions & 3 deletions test/search_api/endpoints/test_search_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,22 @@ class TestSearchAPISearchEndpoint:
pytest.param(
"datasets",
'{"limit": 1, "where": {"isPublic": true}}',
[{}],
[
{
"pid": "0-449-78690-0",
"title": "DATASET 1",
"creationDate": "2002-11-27T06:20:36+00:00",
"isPublic": True,
"size": None,
"documents": [],
"techniques": [],
"instrument": None,
"files": [],
"parameters": [],
"samples": [],
},
],
id="Search datasets with isPublic condition",
# Skipped because the where for isPublic doesn't work
marks=pytest.mark.skip,
),
],
)
Expand Down

0 comments on commit c40639d

Please sign in to comment.