修改测试中使用相对id的地方,原来测试里用了很多id是自己设置的常量,可能引发了错误

This commit is contained in:
sxw@401
2015-09-05 16:25:05 +08:00
parent fd0d5be3bf
commit 75b1bf749e
3 changed files with 11 additions and 11 deletions

View File

@@ -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)