def setUp(self): """ Record the current state of read-only mode and then ensure that it is enabled. """ self.read_only_was_disabled = not read_only_mode if not read_only_mode: read_only_mode.enable() self.assertTrue(read_only_mode)
def enable(self): read_only_mode.enable() self.status()