forked from openlp/openlp
Fix tests
This commit is contained in:
parent
47236b0238
commit
dbd3d8f0ef
@ -421,9 +421,11 @@ class TestPluginManager(TestCase):
|
||||
mocked_plugin = MagicMock()
|
||||
mocked_plugin.name = 'Mocked Plugin'
|
||||
plugin_manager = PluginManager()
|
||||
plugin_manager.plugins = [mocked_plugin]
|
||||
Registry().register('mock_plugin', mocked_plugin)
|
||||
|
||||
# WHEN: We run finalise_plugins()
|
||||
State().add_service("mock", 1, is_plugin=True, status=PluginStatus.Active)
|
||||
State().flush_preconditions()
|
||||
result = plugin_manager.get_plugin_by_name('Mocked Plugin')
|
||||
|
||||
# THEN: The is_active() and finalise() methods should have been called
|
||||
|
@ -123,11 +123,11 @@ class TestState(TestCase, TestMixin):
|
||||
|
||||
# THEN correct the state when I flush the preconditions
|
||||
assert State().modules['test'].pass_preconditions is False
|
||||
assert State().modules['test2'].pass_preconditions is True
|
||||
assert State().modules['test1'].pass_preconditions is True
|
||||
assert State().modules['test2'].pass_preconditions is False
|
||||
assert State().modules['test1'].pass_preconditions is False
|
||||
State().flush_preconditions()
|
||||
assert State().modules['test'].pass_preconditions is False
|
||||
assert State().modules['test2'].pass_preconditions is True
|
||||
assert State().modules['test2'].pass_preconditions is False
|
||||
assert State().modules['test1'].pass_preconditions is False
|
||||
|
||||
def test_basic_preconditions_pass(self):
|
||||
|
Loading…
Reference in New Issue
Block a user