def prepare_director(args, site): """Prepare the director to produce a site.""" loader = ExtensionLoader() loader.load() config = build_config(site.config_file, args) extensions = loader.get_active_extensions(config) return Director(config, site, extensions)
def test_gets_active_extensions(self): config = Configuration() config.active_extensions.add('blog') loader = ExtensionLoader() loader.load() extensions = loader.get_active_extensions(config) self.assertEqual(1, len(extensions)) self.assertTrue(isinstance(extensions[0], BlogExtension))
def test_loads_available_extensions(self): loader = ExtensionLoader() loader.load() self.assertEqual(BlogExtension, loader._available_extensions['blog'])