Changeset View
Changeset View
Standalone View
Standalone View
swh/search/tests/test_init.py
Show All 9 Lines | |||||
from swh.search import get_search | from swh.search import get_search | ||||
from swh.search.api.client import RemoteSearch | from swh.search.api.client import RemoteSearch | ||||
from swh.search.elasticsearch import ElasticSearch | from swh.search.elasticsearch import ElasticSearch | ||||
from swh.search.in_memory import InMemorySearch | from swh.search.in_memory import InMemorySearch | ||||
from swh.search.interface import SearchInterface | from swh.search.interface import SearchInterface | ||||
SEARCH_IMPLEMENTATIONS_KWARGS = [ | SEARCH_IMPLEMENTATIONS_KWARGS = [ | ||||
("remote", RemoteSearch, {"url": "localhost"}), | ("remote", RemoteSearch, {"url": "localhost"}), | ||||
("elasticsearch", ElasticSearch, {"hosts": ["localhost"]}), | ("elasticsearch", ElasticSearch, {"hosts": ["localhost"], "index_prefix": "test"}), | ||||
] | ] | ||||
SEARCH_IMPLEMENTATIONS = SEARCH_IMPLEMENTATIONS_KWARGS + [ | SEARCH_IMPLEMENTATIONS = SEARCH_IMPLEMENTATIONS_KWARGS + [ | ||||
("memory", InMemorySearch, None), | ("memory", InMemorySearch, None), | ||||
] | ] | ||||
def test_get_search_failure(): | def test_get_search_failure(): | ||||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |