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)