From 671f58e41ba52f1bd4945db41634645bd5509878 Mon Sep 17 00:00:00 2001 From: genja Date: Fri, 26 Jun 2026 01:34:35 +0200 Subject: [PATCH] test adjusted --- .../main/inse/patents/test_elastic_search_client.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/service/src/main/inse/patents/test_elastic_search_client.py b/service/src/main/inse/patents/test_elastic_search_client.py index 729e8d51..6aea4c7c 100644 --- a/service/src/main/inse/patents/test_elastic_search_client.py +++ b/service/src/main/inse/patents/test_elastic_search_client.py @@ -1,11 +1,9 @@ import pytest from unittest.mock import patch, MagicMock - +from inse.model import ESIndex from inse.patents.elastic_search_client import ( DEFAULT_SEARCH_SIZE, - EPO_INDEX, PatentSearchClient, - USPTO_INDEX, ) @@ -28,15 +26,15 @@ def test_epo_query_uses_nested_search_and_name_variants(): def test_uspto_index_is_3_0(): - assert USPTO_INDEX == "uspto_patents_3.0" - assert EPO_INDEX == "epo_index_1.0" + assert ESIndex.USPTO_INDEX == "uspto_patents_3.0" + assert ESIndex.EPO_INDEX == "epo_index_1.0" @pytest.mark.anyio async def test_search_epo_posts_to_correct_index(): captured: list[dict] = [] - def fake_search(index: str, body: dict): + def fake_search(index: str, body: dict, cluster=None): captured.append({"index": index, "body": body}) return {"hits": {"hits": []}} @@ -45,4 +43,4 @@ async def test_search_epo_posts_to_correct_index(): await client.search_epo(client.epo_query_by_inventor("Weber", "Christian")) assert len(captured) == 1 - assert captured[0]["index"] == EPO_INDEX \ No newline at end of file + assert captured[0]["index"] == ESIndex.EPO_INDEX \ No newline at end of file