def test_decode_parameter_value_class_1(self): self.assertEquals(ConcreteAutoConfigurable, ConfigTools.decode_parameter_value(dict({"value": "test.commons.testdata.config_tools_testdata.ConcreteAutoConfigurable", "type": "class"}), lambda module, cls: ConcreteAutoConfigurable if (module, cls)==("test.commons.testdata.config_tools_testdata", "ConcreteAutoConfigurable") else None))
def test_decode_parameter_value_object_1(self): obj = ConfigTools.decode_parameter_value(dict({"value": "test.commons.testdata.config_tools_testdata.ConcreteAutoConfigurable", "type": "object"}), lambda module, cls: ConcreteAutoConfigurable if (module, cls)==("test.commons.testdata.config_tools_testdata", "ConcreteAutoConfigurable") else None) self.assertTrue(isinstance(obj, ConcreteAutoConfigurable))
def test_decode_parameter_value_2(self): self.assertEquals(14, ConfigTools.decode_parameter_value(dict({"value": "14", "type": "int"}), None))