本文整理汇总了Python中neutron.api.extensions.get_extensions_path函数的典型用法代码示例。如果您正苦于以下问题:Python get_extensions_path函数的具体用法?Python get_extensions_path怎么用?Python get_extensions_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_extensions_path函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_extensions_path_with_plugins
def test_get_extensions_path_with_plugins(self):
cfg.CONF.set_override('api_extensions_path',
'neutron/tests/unit/extensions')
path = extensions.get_extensions_path(
{lib_const.CORE: FakePluginWithExtension()})
self.assertEqual(path,
'%s:neutron/tests/unit/extensions' % self.base_path)
示例2: test_get_extensions_path_duplicate_extensions
def test_get_extensions_path_duplicate_extensions(self):
cfg.CONF.set_override('api_extensions_path', 'path1:path1')
path = extensions.get_extensions_path()
self.assertEqual(path, '%s:path1' % self.base_path)
示例3: test_get_extensions_path_no_extensions
def test_get_extensions_path_no_extensions(self):
# Reset to default value, as it's overridden by base class
cfg.CONF.set_override('api_extensions_path', '')
path = extensions.get_extensions_path()
self.assertEqual(path, self.base_path)
示例4: setUp
def setUp(self):
self.base_path = extensions.get_extensions_path()
super(ExtensionPathTest, self).setUp()
示例5: test_get_extensions_path_with_plugins
def test_get_extensions_path_with_plugins(self):
path = extensions.get_extensions_path(
{constants.CORE: FakePluginWithExtension()})
self.assertEqual(path,
'%s:neutron/tests/unit/extensions' % self.base_path)