def test_formats(self): registry = self.createRegistry(td.xml) adapted = IDecoRegistryAdapter(registry) settings = adapted.parseRegistry() config = adapted.mapFormatCategories(settings, {}) config = adapted.mapFormats(settings, config) self.assertEqual(config, td.parsed_format_data)
def test_application_tiles(self): self.maxDiff = None registry = self.createRegistry(td.xml) adapted = IDecoRegistryAdapter(registry) settings = adapted.parseRegistry() config = adapted.mapTilesCategories(settings, {}) config = adapted.mapTiles(settings, config, 'app_tiles') self.assertEqual(config, td.parsed_application_tiles_data)
def test_actions(self): registry = self.createRegistry(td.xml) adapted = IDecoRegistryAdapter(registry) settings = adapted.parseRegistry() config = adapted.mapActions(settings, {}) self.assertEqual(config['primary_actions'], td.parsed_primary_actions_data) self.assertEqual(config['secondary_actions'], td.parsed_secondary_actions_data)
def test_config(self): """tests if the parsed registry data is correct""" registry = self.createRegistry(td.xml) settings = IDecoRegistryAdapter(registry)() self.assertEqual(settings, td.parsed_data)
def test_tiles_categories(self): registry = self.createRegistry(td.xml) adapted = IDecoRegistryAdapter(registry) settings = adapted.parseRegistry() config = adapted.mapTilesCategories(settings, {}) self.assertEqual(config, td.parsed_tiles_categories_data)