Пример #1
0
    def test_maintenance_disable(self):
        Config.objects.create(key='maintenance', value=True)

        # First try, turn off maintenance mode
        maintenance.disable()
        self.assertFalse(Config.objects.get(key='maintenance').value)

        # Second try, nothing is changed now
        maintenance.disable()
        self.assertFalse(Config.objects.get(key='maintenance').value)
Пример #2
0
    def test_maintenance_disable(self):
        Config.objects.create(key='maintenance', value=True)

        # First try, turn off maintenance mode
        maintenance.disable()
        self.assertFalse(Config.objects.get(key='maintenance').value)

        # Second try, nothing is changed now
        maintenance.disable()
        self.assertFalse(Config.objects.get(key='maintenance').value)
Пример #3
0
 def test_maintenance_disable_empty_table(self):
     maintenance.disable()
     self.assertFalse(Config.objects.get(key='maintenance').value)
Пример #4
0
 def test_maintenance_disable_empty_table(self):
     maintenance.disable()
     self.assertFalse(Config.objects.get(key='maintenance').value)