def test_views_superuser(self): self.__reset_state() url = reverse('maintenance_mode_on') request = self.__get_superuser_request(url) views.maintenance_mode_on(request) val = core.get_maintenance_mode() self.assertTrue(val) url = reverse('maintenance_mode_off') request = self.__get_superuser_request(url) views.maintenance_mode_off(request) val = core.get_maintenance_mode() self.assertFalse(val)
def test_views_superuser(self): self.__reset_state() url = reverse('maintenance_mode_on') request = self.__get_superuser_request(url) views.maintenance_mode_on(request) val = core.get_maintenance_mode() self.assertTrue(val) url = reverse('maintenance_mode_off') request = self.__get_superuser_request(url) views.maintenance_mode_off(request) val = core.get_maintenance_mode() self.assertFalse(val)