forked from innovacion/searchbox
Rewrite tests while keeping 97% cov
This commit is contained in:
18
tests/test_engine/test_engine_init.py
Normal file
18
tests/test_engine/test_engine_init.py
Normal file
@@ -0,0 +1,18 @@
|
||||
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]
|
||||
Reference in New Issue
Block a user