From 290a7403771744b1771dbfc7d83795db1d429ed9 Mon Sep 17 00:00:00 2001 From: Devin Gaffney Date: Fri, 22 Sep 2023 11:47:30 -0700 Subject: [PATCH] Update test_fasttext.py --- test/lib/model/test_fasttext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lib/model/test_fasttext.py b/test/lib/model/test_fasttext.py index ab2129e..0a0315c 100644 --- a/test/lib/model/test_fasttext.py +++ b/test/lib/model/test_fasttext.py @@ -12,7 +12,7 @@ def setUp(self): def test_respond(self, mock_fasttext_load_model, mock_hf_hub_download): mock_hf_hub_download.return_value = 'mocked_path' mock_fasttext_load_model.return_value = self.mock_model - self.mock_model.predict.return_value = (['__label__eng_Latn'], [0.9]) + self.mock_model.predict.return_value = (['__label__eng_Latn'], np.array([0.902323124])) model = FasttextModel() # Now it uses mocked functions query = [schemas.Message(body=schemas.TextInput(id="123", callback_url="http://example.com/callback", text="Hello, how are you?"))] response = model.respond(query)