From 8d2bcc9a62ef403ec879cc715585971ed249e991 Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Wed, 6 Nov 2024 01:54:25 +0900 Subject: [PATCH] fix test --- tests/__init__.py | 1 + tests/api/test_team_api.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/__init__.py b/tests/__init__.py index 1a9add1..dc55da3 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -35,6 +35,7 @@ def create_test_app(): class MoeTestCase(TestCase): + maxDiff = None def setUp(self): self.app = create_test_app() self.app_context = self.app.app_context() diff --git a/tests/api/test_team_api.py b/tests/api/test_team_api.py index f887f3d..a1633d6 100644 --- a/tests/api/test_team_api.py +++ b/tests/api/test_team_api.py @@ -115,7 +115,9 @@ def test_get_team_list2(self): # word = t,搜到 2 个 data = self.get("/v1/teams", query_string={"word": "t"}, token=token) self.assertErrorEqual(data) - self.assertEqual(2, len(data.json)) + self.assertEqual( + # default team + t1 + t2 + 3, len(data.json)) # word = 1,搜到 1 个 data = self.get("/v1/teams", query_string={"word": "1"}, token=token) self.assertErrorEqual(data)