修改密码错误返回值导致CI测试不通过问题

This commit is contained in:
Harry-zklcdc 2019-09-30 21:15:37 +08:00
parent ed16473d92
commit 82986dee1b

View File

@ -79,7 +79,7 @@ class ContestAPITest(APITestCase):
self.create_user("test", "test123")
url = self.reverse("contest_password_api")
resp = self.client.post(url, {"contest_id": self.contest.id, "password": "error_password"})
self.assertDictEqual(resp.data, {"error": "error", "data": "Wrong password"})
self.assertDictEqual(resp.data, {"error": "error", "data": "Wrong password or password expired"})
resp = self.client.post(url, {"contest_id": self.contest.id, "password": DEFAULT_CONTEST_DATA["password"]})
self.assertSuccess(resp)