def get_deprecations(): """Return a list of currently active deprecation notices.""" deprecations = [] def add_deprecation(id): deprecation = deepcopy(DEPRECATIONS[id]) deprecation["id"] = id deprecation["url"] = DEPRECATION_URL.format(id=id) deprecations.append(deprecation) if snappy.running_in_snap() and snappy.get_snap_mode() == "all": add_deprecation("MD1") return deprecations
def get_deprecations(): """Return a list of currently active deprecation notices.""" deprecations = [] if snappy.running_in_snap() and snappy.get_snap_mode() == "all": deprecations.append(DEPRECATIONS["NO_ALL_MODE"]) return deprecations
def test_get_snap_mode_mode_other(self): self._write_snap_mode("rack+region") self.assertEqual(snappy.get_snap_mode(), "rack+region")
def test_get_snap_mode_mode_none(self): self._write_snap_mode("none") self.assertIsNone(snappy.get_snap_mode())