Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Updated import

davidmezzetti4d9a2316177b
diff --git a/test/python/testapi.py b/test/python/testapi.py
index f4f37ada..d90a536e 100644
--- a/test/python/testapi.py
+++ b/test/python/testapi.py
@@ -6,6 +6,8 @@ import os
import tempfile
import unittest
+from unittest import mock
+
import numpy as np
from fastapi.testclient import TestClient
@@ -48,7 +50,7 @@ class TestAPI(unittest.TestCase):
"""
@staticmethod
- @unittest.mock.patch.dict(os.environ, {"CONFIG": "/tmp/testapi.yml", "API_CLASS": "txtai.api.API"})
+ @mock.patch.dict(os.environ, {"CONFIG": "/tmp/testapi.yml", "API_CLASS": "txtai.api.API"})
def start(full):
"""
Starts a mock FastAPI client.