Пример #1
0
 def _parse_to_enum_instances(params, location):
     for key in params.keys():
         class_name = DefaultParamsLoader._convert_to_camel_case(key)
         if ReflectionHandler.exists(class_name, location):
             cls = ReflectionHandler.get_class_by_name(class_name, location)
             params[key] = cls[params[key].upper()]
     return params
Пример #2
0
 def test_exists(self):
     self.assertTrue(ReflectionHandler.exists("ReflectionHandler", "util"))
     self.assertTrue(ReflectionHandler.exists("ReflectionHandler"))
     self.assertFalse(ReflectionHandler.exists("RandomClassName"))