forked from innovacion/searchbox
19 lines
543 B
Python
19 lines
543 B
Python
import pytest
|
|
from searchbox.engine import UnknownEngineError, get_engine
|
|
from searchbox.engine.qdrant_engine import QdrantEngine
|
|
|
|
|
|
def test_get_qdrant_engine():
|
|
engine = get_engine("qdrant")
|
|
assert isinstance(engine, QdrantEngine)
|
|
|
|
|
|
def test_get_qdrant_engine_with_kwargs():
|
|
engine = get_engine("qdrant", url="http://localhost:6333", api_key=None)
|
|
assert isinstance(engine, QdrantEngine)
|
|
|
|
|
|
def test_get_unknown_engine():
|
|
with pytest.raises(UnknownEngineError):
|
|
get_engine("unknown") # type: ignore[reportCallArgs]
|