示例#1
0
    def load_default_dynamic_maps(self, dynamics_configuration):
        if PluralMap.NAME not in self._dynamic_maps:
            YLogger.warning(
                self,
                "Dynamic set %s not defined, adding default implementation",
                PluralMap.NAME)
            self._dynamic_maps[PluralMap.NAME] = PluralMap(
                dynamics_configuration)

        if SingularMap.NAME not in self._dynamic_maps:
            YLogger.warning(
                self,
                "Dynamic set %s not defined, adding default implementation",
                SingularMap.NAME)
            self._dynamic_maps[SingularMap.NAME] = SingularMap(
                dynamics_configuration)

        if SuccessorMap.NAME not in self._dynamic_maps:
            YLogger.warning(
                self,
                "Dynamic set %s not defined, adding default implementation",
                SuccessorMap.NAME)
            self._dynamic_maps[SuccessorMap.NAME] = SuccessorMap(
                dynamics_configuration)

        if PredecessorMap.NAME not in self._dynamic_maps:
            YLogger.warning(
                self,
                "Dynamic set %s not defined, adding default implementation",
                PredecessorMap.NAME)
            self._dynamic_maps[PredecessorMap.NAME] = PredecessorMap(
                dynamics_configuration)
示例#2
0
    def load_default_dynamic_maps(self, dynamics_configuration):
        if PluralMap.NAME not in self._dynamic_maps:
            if logging.getLogger().isEnabledFor(logging.WARNING): logging.warning("Dynamic set %s not defined, adding default implementation"%PluralMap.NAME)
            self._dynamic_maps[PluralMap.NAME] = PluralMap(dynamics_configuration)

        if SingularMap.NAME not in self._dynamic_maps:
            if logging.getLogger().isEnabledFor(logging.WARNING): logging.warning("Dynamic set %s not defined, adding default implementation"%SingularMap.NAME)
            self._dynamic_maps[SingularMap.NAME] = SingularMap(dynamics_configuration)

        if SuccessorMap.NAME not in self._dynamic_maps:
            if logging.getLogger().isEnabledFor(logging.WARNING): logging.warning("Dynamic set %s not defined, adding default implementation"%SuccessorMap.NAME)
            self._dynamic_maps[SuccessorMap.NAME] = SuccessorMap(dynamics_configuration)

        if PredecessorMap.NAME not in self._dynamic_maps:
            if logging.getLogger().isEnabledFor(logging.WARNING): logging.warning("Dynamic set %s not defined, adding default implementation"%PredecessorMap.NAME)
            self._dynamic_maps[PredecessorMap.NAME] = PredecessorMap(dynamics_configuration)
示例#3
0
 def test_successor_text(self):
     map = SuccessorMap(None)
     self.assertEqual("", map.map_value(self._client_context, "one"))
示例#4
0
 def test_successor_text(self):
     map = SuccessorMap(None)
     self.assertEqual("", map.map_value(self._client_context, "one"))
 def test_successor(self):
     map = SuccessorMap(None)
     self.assertEqual("2", map.map_value(None, "clientid", "1"))
 def test_successor_text(self):
     map = SuccessorMap(None)
     self.assertEqual("", map.map_value(None, "clientid", "one"))