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)
def test_maintenance_disable_empty_table(self): maintenance.disable() self.assertFalse(Config.objects.get(key='maintenance').value)