From 33b6c19f0112a4762ae6c8bcaf0a74dc9e3c0d51 Mon Sep 17 00:00:00 2001 From: jimin9038 Date: Tue, 12 Apr 2022 06:26:42 +0000 Subject: [PATCH] fix: add assertSuccess to testcase --- backend/contest/tests.py | 6 +++++- frontend/src/pages/oj/views/problem/Problem.vue | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/contest/tests.py b/backend/contest/tests.py index 0efae5502..71321b847 100644 --- a/backend/contest/tests.py +++ b/backend/contest/tests.py @@ -267,13 +267,17 @@ def test_create_problem_bank(self): self.create_user("2018123123", "123123") url = self.reverse("contest_bank_api") response = self.client.post(url, data={"contest_id": contest["id"]}) + self.assertSuccess(response) class UserContestAPITest(APITestCase): def setUp(self): # create contest admin = self.create_admin() - self.contest = Contest.objects.create(created_by=admin, **DEFAULT_CONTEST_DATA) + data = copy.deepcopy(DEFAULT_CONTEST_DATA) + data.pop("allowed_groups") + data.pop("prizes") + self.contest = Contest.objects.create(created_by=admin, **data) # create problem in contest data = copy.deepcopy(DEFAULT_PROBLEM_DATA) diff --git a/frontend/src/pages/oj/views/problem/Problem.vue b/frontend/src/pages/oj/views/problem/Problem.vue index def6e74f0..168b82c58 100644 --- a/frontend/src/pages/oj/views/problem/Problem.vue +++ b/frontend/src/pages/oj/views/problem/Problem.vue @@ -347,7 +347,6 @@ export default { ProblemSidebar, login, register, - profileSetting, Table, VueResizable, UserSetting