Skip to content

Commit

Permalink
test: fix failing integration test #398
Browse files Browse the repository at this point in the history
  • Loading branch information
VKTB committed Feb 14, 2023
1 parent 70cd754 commit 042049f
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from unittest.mock import patch

import pytest

from datagateway_api.src.common.exceptions import FilterError, SearchAPIError
Expand Down Expand Up @@ -1906,6 +1908,11 @@ def test_valid_skip_filter(
assert isinstance(filters[0], SearchAPISkipFilter)
assert filters[0].skip_value == expected_skip_value

@patch(
"datagateway_api.src.common.config.Config.config.search_api.search_scoring"
".enabled",
True,
)
def test_valid_scoring_filter(self):
scoring_query_filter_value = "My test query"
test_request_filter = {"filter": {"query": scoring_query_filter_value}}
Expand All @@ -1921,6 +1928,11 @@ def test_valid_scoring_filter(self):
assert filters[0].value == scoring_query_filter_value
assert filters[0].operation == "ilike"

@patch(
"datagateway_api.src.common.config.Config.config.search_api.search_scoring"
".enabled",
True,
)
@pytest.mark.parametrize(
"entity_name",
[
Expand Down

0 comments on commit 042049f

Please sign in to comment.