XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/gpt4free

Fix uittests

44c7e773
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +3 -3
Modified etc/unittest/backend.py +3 -3
@@ -10,9 +10,9 @@ try:
10 10 except:
11 11 has_requirements = False
12 12 try:
13 from duckduckgo_search.exceptions import DuckDuckGoSearchException
13 from ddgs.exceptions import DDGSException
14 14 except ImportError:
15 class DuckDuckGoSearchException:
15 class DDGSException(Exception):
16 16 pass
17 17
18 18 class TestBackendApi(unittest.TestCase):
@@ -42,7 +42,7 @@ class TestBackendApi(unittest.TestCase):
42 42 from g4f.gui.server.internet import search
43 43 try:
44 44 result = asyncio.run(search("Hello"))
45 except DuckDuckGoSearchException as e:
45 except DDGSException as e:
46 46 self.skipTest(e)
47 47 except MissingRequirementsError:
48 48 self.skipTest("search is not installed")