forked from openlp/openlp
try again
This commit is contained in:
parent
f0108d89fc
commit
72cd432f10
@ -161,13 +161,15 @@ class State(LogMixin):
|
|||||||
mod = self.modules[name].requires
|
mod = self.modules[name].requires
|
||||||
return self.modules[mod].pass_preconditions
|
return self.modules[mod].pass_preconditions
|
||||||
|
|
||||||
def list_plugins(self):
|
def list_plugins(self, a=None):
|
||||||
"""
|
"""
|
||||||
Return a list of plugins
|
Return a list of plugins
|
||||||
:return: an array of plugins
|
:return: an array of plugins
|
||||||
"""
|
"""
|
||||||
plugins = []
|
plugins = []
|
||||||
|
if a == 1:
|
||||||
|
assert [] == self.modules
|
||||||
for mod in self.modules:
|
for mod in self.modules:
|
||||||
if mod and self.modules[mod].is_plugin:
|
if self.modules[mod].is_plugin:
|
||||||
plugins.append(Registry().get('{mod}_plugin'.format(mod=mod)))
|
plugins.append(Registry().get('{mod}_plugin'.format(mod=mod)))
|
||||||
return plugins
|
return plugins
|
||||||
|
@ -86,7 +86,7 @@ class TestPluginManager(TestCase, TestMixin):
|
|||||||
sys.platform = old_platform
|
sys.platform = old_platform
|
||||||
|
|
||||||
# THEN: We should find the "Songs", "Bibles", etc in the plugins list
|
# THEN: We should find the "Songs", "Bibles", etc in the plugins list
|
||||||
assert [] == State().list_plugins()
|
assert [] == State().list_plugins(a=1)
|
||||||
plugin_names = [plugin.name for plugin in State().list_plugins()]
|
plugin_names = [plugin.name for plugin in State().list_plugins()]
|
||||||
assert 'songs' in plugin_names, 'There should be a "songs" plugin'
|
assert 'songs' in plugin_names, 'There should be a "songs" plugin'
|
||||||
assert 'bibles' in plugin_names, 'There should be a "bibles" plugin'
|
assert 'bibles' in plugin_names, 'There should be a "bibles" plugin'
|
||||||
|
Loading…
Reference in New Issue
Block a user