def parse_widget(self, config): type_cls = utils.load_class_by_string(config['type']) if issubclass(type_cls, DynamicWidget): config['backend'] = utils.add_dicts( self.backend_dict, config.get('backend', {})) config_cls = Config.for_type(config['type']) return config_cls(config)
def test_for_type(self): self.assertTrue( Config.for_type('diamondash.tests.test_config.ToyConfigurable') is ToyConfig)