def test_public_route(self, public_route): self.request.matched_route.name = public_route assert not display_design(self.request)
def test_no_route(self): self.request.matched_route = None assert not display_design(self.request)
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)
def test_test_login(self): self.request.session["test-login"] = True assert display_design(self.request)
def test_admin(self): self.request.path = "/admin/something" assert not display_design(self.request)
def test_else(self): assert not self.request.settings.ctf_started assert not display_design(self.request)