def test_override(self): switch = WaffleSwitch("test_namespace.test_switch", module_name="testmodule") self.assertFalse(switch.is_enabled()) with override_waffle_switch(switch, active=True): self.assertTrue(switch.is_enabled()) self.assertFalse(switch.is_enabled())
def test_override(self): switch = WaffleSwitch( # lint-amnesty, pylint: disable=toggle-missing-annotation "test_namespace.test_switch", module_name="testmodule" ) self.assertFalse(switch.is_enabled()) with override_waffle_switch(switch, active=True): self.assertTrue(switch.is_enabled()) self.assertFalse(switch.is_enabled())