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
|
||||
return self.modules[mod].pass_preconditions
|
||||
|
||||
def list_plugins(self):
|
||||
def list_plugins(self, a=None):
|
||||
"""
|
||||
Return a list of plugins
|
||||
:return: an array of plugins
|
||||
"""
|
||||
plugins = []
|
||||
if a == 1:
|
||||
assert [] == 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)))
|
||||
return plugins
|
||||
|
@ -86,7 +86,7 @@ class TestPluginManager(TestCase, TestMixin):
|
||||
sys.platform = old_platform
|
||||
|
||||
# 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()]
|
||||
assert 'songs' in plugin_names, 'There should be a "songs" plugin'
|
||||
assert 'bibles' in plugin_names, 'There should be a "bibles" plugin'
|
||||
|
Loading…
Reference in New Issue
Block a user