예제 #1
0
파일: tests.py 프로젝트: robertsjw/crits
 def testUserInactiveRedirect(self):
     self.req = self.factory.get("/signatures/list/")
     self.req.user = self.user
     self.req.user.mark_inactive()
     response = views.signatures_listing(self.req)
     self.assertEqual(response.status_code, 302)
     self.assertTrue("/login/?next=/signatures/list/" in response["Location"])
     self.req.user.mark_active()
     response = views.signatures_listing(self.req)
     self.assertEqual(response.status_code, 200)
예제 #2
0
파일: tests.py 프로젝트: robertsjw/crits
 def testSignaturesjtList(self):
     self.req = self.factory.post("/signatures/list/jtlist/", {}, HTTP_X_REQUESTED_WITH="XMLHttpRequest")
     self.req.user = self.user
     response = views.signatures_listing(self.req, "jtlist")
     self.assertEqual(response.status_code, 200)
예제 #3
0
파일: tests.py 프로젝트: robertsjw/crits
 def testSignaturesList(self):
     self.req = self.factory.get("/signatures/list/")
     self.req.user = self.user
     response = views.signatures_listing(self.req)
     self.assertEqual(response.status_code, 200)
     self.assertTrue("#signature_listing" in response.content)