mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-12-29 00:22:03 +00:00
fix(test): 修复错误提示
This commit is contained in:
parent
6dda49592e
commit
a4a66d2271
@ -79,7 +79,7 @@ class ContestAPITest(APITestCase):
|
|||||||
self.create_user("test", "test123")
|
self.create_user("test", "test123")
|
||||||
url = self.reverse("contest_password_api")
|
url = self.reverse("contest_password_api")
|
||||||
resp = self.client.post(url, {"contest_id": self.contest.id, "password": "error_password"})
|
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"]})
|
resp = self.client.post(url, {"contest_id": self.contest.id, "password": DEFAULT_CONTEST_DATA["password"]})
|
||||||
self.assertSuccess(resp)
|
self.assertSuccess(resp)
|
||||||
|
Loading…
Reference in New Issue
Block a user