Skip to content

Commit

Permalink
test: add tests for search API endpoints #257
Browse files Browse the repository at this point in the history
  • Loading branch information
MRichards99 committed Nov 2, 2021
1 parent de15357 commit bc1d09d
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions test/test_endpoint_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,51 @@ def test_entity_endpoints(self, flask_test_app, endpoint_ending, expected_method
["GET"],
id="count ISIS investigations",
),
pytest.param(
"/search_api/datasets", ["GET"], id="Search API search datasets",
),
pytest.param(
"/search_api/documents", ["GET"], id="Search API search documents",
),
pytest.param(
"/search_api/instruments", ["GET"], id="Search API search instruments",
),
pytest.param(
"/search_api/datasets/<int:pid>",
["GET"],
id="Search API get single dataset",
),
pytest.param(
"/search_api/documents/<int:pid>",
["GET"],
id="Search API get single document",
),
pytest.param(
"/search_api/instruments/<int:pid>",
["GET"],
id="Search API get single instrument",
),
pytest.param(
"/search_api/datasets/count", ["GET"], id="Search API dataset count",
),
pytest.param(
"/search_api/documents/count", ["GET"], id="Search API document count",
),
pytest.param(
"/search_api/instruments/count",
["GET"],
id="Search API instrument count",
),
pytest.param(
"/search_api/datasets/<int:pid>/files",
["GET"],
id="Search API get dataset files",
),
pytest.param(
"/search_api/datasets/<int:pid>/files/count",
["GET"],
id="Search API dataset files count",
),
],
)
def test_non_entity_endpoints(
Expand Down

0 comments on commit bc1d09d

Please sign in to comment.