Skip to content

Commit

Permalink
Update test_fasttext.py
Browse files Browse the repository at this point in the history
  • Loading branch information
DGaffney authored Sep 22, 2023
1 parent 44a523f commit 8bfbd54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/lib/model/test_fasttext.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,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'], np.array([0.902323124]))
self.mock_model.predict.return_value = (['__label__eng_Latn'], np.array([0.9]))
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)
Expand Down

0 comments on commit 8bfbd54

Please sign in to comment.