예제 #1
0
 def test_public_route(self, public_route):
     self.request.matched_route.name = public_route
     assert not display_design(self.request)
예제 #2
0
 def test_no_route(self):
     self.request.matched_route = None
     assert not display_design(self.request)
예제 #3
0
 def test_ctf_started(self):
     self.settings.ctf_start_date = datetime(2012, 1, 1, tzinfo=utc)
     self.settings.ctf_end_date = util.now() + timedelta(1)
     assert display_design(self.request)
예제 #4
0
 def test_test_login(self):
     self.request.session["test-login"] = True
     assert display_design(self.request)
예제 #5
0
 def test_admin(self):
     self.request.path = "/admin/something"
     assert not display_design(self.request)
예제 #6
0
 def test_else(self):
     assert not self.request.settings.ctf_started
     assert not display_design(self.request)