Skip to content
Snippets Groups Projects
Commit 1f2b9f0e authored by James Briggs's avatar James Briggs
Browse files

fix: modify test to catch error

parent a89724de
No related branches found
No related tags found
No related merge requests found
...@@ -152,7 +152,7 @@ def routes_4(): ...@@ -152,7 +152,7 @@ def routes_4():
@pytest.fixture @pytest.fixture
def route_single_utterance(): def route_single_utterance():
return [ return [
Route(name="Route 1", utterances=["Hello"]), Route(name="Route 3", utterances=["Hello"]),
] ]
...@@ -259,11 +259,12 @@ class TestSemanticRouter: ...@@ -259,11 +259,12 @@ class TestSemanticRouter:
assert route_layer.score_threshold == openai_encoder.score_threshold assert route_layer.score_threshold == openai_encoder.score_threshold
def test_add_single_utterance( def test_add_single_utterance(
self, route_single_utterance, openai_encoder, index_cls self, routes, route_single_utterance, openai_encoder, index_cls
): ):
index = init_index(index_cls) index = init_index(index_cls)
route_layer = SemanticRouter( route_layer = SemanticRouter(
encoder=openai_encoder, encoder=openai_encoder,
routes=routes,
index=index, index=index,
auto_sync="local", auto_sync="local",
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment