修改测试中使用相对id的地方,原来测试里用了很多id是自己设置的常量,可能引发了错误
This commit is contained in:
@@ -370,7 +370,7 @@ class ContestProblemAdminAPItEST(APITestCase):
|
||||
|
||||
def test_query_contest_problem_exists_by_contest_id(self):
|
||||
self.client.login(username="test3", password="testaa")
|
||||
response = self.client.get(self.url + "?contest_id=1")
|
||||
response = self.client.get(self.url + "?contest_id="+ str(self.global_contest.id))
|
||||
self.assertEqual(response.data["code"], 0)
|
||||
self.assertEqual(len(response.data["data"]), 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user