This commit is contained in:
Tim Bentley 2016-08-12 19:56:25 +01:00
parent 225160be24
commit b3f10eb852

View File

@ -39,8 +39,7 @@ class MediaPluginTest(TestCase, TestMixin):
Registry.create() Registry.create()
@patch(u'openlp.plugins.media.mediaplugin.Plugin.initialise') @patch(u'openlp.plugins.media.mediaplugin.Plugin.initialise')
@patch(u'openlp.plugins.media.mediaplugin.Settings') def test_initialise(self, mocked_initialise):
def test_initialise(self, _mocked_settings, mocked_initialise):
""" """
Test that the initialise() method overwrites the built-in one, but still calls it Test that the initialise() method overwrites the built-in one, but still calls it
""" """
@ -48,7 +47,6 @@ class MediaPluginTest(TestCase, TestMixin):
media_plugin = MediaPlugin() media_plugin = MediaPlugin()
mocked_settings = MagicMock() mocked_settings = MagicMock()
mocked_settings.get_files_from_config.return_value = True # Not the real value, just need something "true-ish" mocked_settings.get_files_from_config.return_value = True # Not the real value, just need something "true-ish"
_mocked_settings.return_value = mocked_settings
# WHEN: initialise() is called # WHEN: initialise() is called
media_plugin.initialise() media_plugin.initialise()