forked from openlp/openlp
Add a test
This commit is contained in:
parent
11876436a1
commit
7ebbf65a86
@ -60,6 +60,22 @@ class TestMediaManagerItem(TestCase, TestMixin):
|
||||
# THEN: on_preview_click() should have been called
|
||||
mocked_on_preview_click.assert_called_with()
|
||||
|
||||
def required_icons_test(self):
|
||||
"""
|
||||
Test the default icons for plugins
|
||||
"""
|
||||
# GIVEN: A MediaManagerItem
|
||||
mmi = MediaManagerItem(None)
|
||||
# WHEN: Object is created
|
||||
mmi.required_icons()
|
||||
# THEN: Default icons should be populated
|
||||
self.assertFalse(mmi.has_import_icon, 'There should be no import icon by default')
|
||||
self.assertTrue(mmi.has_new_icon, 'By default a new icon should be present')
|
||||
self.assertFalse(mmi.has_file_icon, 'There should be no file icon by default')
|
||||
self.assertTrue(mmi.has_delete_icon, 'By default a delete icon should be present')
|
||||
self.assertFalse(mmi.add_to_service_item, 'There should be no add_to_service icon by default')
|
||||
|
||||
|
||||
@patch(u'openlp.core.lib.mediamanageritem.Settings')
|
||||
@patch(u'openlp.core.lib.mediamanageritem.MediaManagerItem.on_live_click')
|
||||
def on_double_clicked_go_live_test(self, mocked_on_live_click, MockedSettings):
|
||||
|
Loading…
Reference in New Issue
Block a user