From f2a8c437de60677dde3e229684eadb3cca47da0c Mon Sep 17 00:00:00 2001 From: esp Date: Sat, 29 Aug 2015 08:33:38 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=90=8E=E7=AB=AF]=E6=B7=BB=E5=8A=A0=E6=98=A8?= =?UTF-8?q?=E5=A4=A9=E4=BF=AE=E6=94=B9=E7=9A=84=E6=88=91=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=E7=9A=84=E6=B5=8B?= =?UTF-8?q?=E8=AF=95,=E5=85=A8=E8=A6=86=E7=9B=96=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- submission/tests.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/submission/tests.py b/submission/tests.py index 04f0a86..3aab246 100644 --- a/submission/tests.py +++ b/submission/tests.py @@ -29,6 +29,16 @@ class SubmissionsListPageTest(TestCase): response = self.client.get('/submissions/1/') self.assertEqual(response.status_code, 200) + def test_visit_submissionsListPage_successfully_language_filter(self): + self.client.login(username="gogoing", password="666666") + response = self.client.get('/submissions/?language=1') + self.assertEqual(response.status_code, 200) + + def test_visit_submissionsListPage_successfully_result_filter(self): + self.client.login(username="gogoing", password="666666") + response = self.client.get('/submissions/?result=1') + self.assertEqual(response.status_code, 200) + def test_visit_submissionsListPage_without_page_successfully(self): self.client.login(username="gogoing", password="666666") response = self.client.get('/submissions/') @@ -137,10 +147,3 @@ class ContestSubmissionAPITest(APITestCase): data = {"language": 1} response = self.client.post(self.url, data=data) pass - - - - - - -