forked from openlp/openlp
Test fixes
This commit is contained in:
commit
881c3648cc
@ -193,18 +193,6 @@ class Ui_ServiceManager(object):
|
||||
text=translate('OpenLP.ServiceManager', 'Move to &bottom'), icon=':/services/service_bottom.png',
|
||||
tooltip=translate('OpenLP.ServiceManager', 'Move item to the end of the service.'),
|
||||
can_shortcuts=True, category=UiStrings().Service, triggers=self.on_service_end)
|
||||
self.down_action = self.order_toolbar.add_toolbar_action(
|
||||
'down',
|
||||
text=translate('OpenLP.ServiceManager', 'Move &down'), can_shortcuts=True,
|
||||
tooltip=translate('OpenLP.ServiceManager', 'Moves the selection down the window.'), visible=False,
|
||||
triggers=self.on_move_selection_down)
|
||||
action_list.add_action(self.down_action)
|
||||
self.up_action = self.order_toolbar.add_toolbar_action(
|
||||
'up',
|
||||
text=translate('OpenLP.ServiceManager', 'Move up'), can_shortcuts=True,
|
||||
tooltip=translate('OpenLP.ServiceManager', 'Moves the selection up the window.'), visible=False,
|
||||
triggers=self.on_move_selection_up)
|
||||
action_list.add_action(self.up_action)
|
||||
self.order_toolbar.addSeparator()
|
||||
self.delete_action = self.order_toolbar.add_toolbar_action(
|
||||
'delete', can_shortcuts=True,
|
||||
@ -300,8 +288,8 @@ class Ui_ServiceManager(object):
|
||||
self.theme_menu = QtWidgets.QMenu(translate('OpenLP.ServiceManager', '&Change Item Theme'))
|
||||
self.menu.addMenu(self.theme_menu)
|
||||
self.service_manager_list.addActions([self.move_down_action, self.move_up_action, self.make_live_action,
|
||||
self.move_top_action, self.move_bottom_action, self.up_action,
|
||||
self.down_action, self.expand_action, self.collapse_action])
|
||||
self.move_top_action, self.move_bottom_action, self.expand_action,
|
||||
self.collapse_action])
|
||||
Registry().register_function('theme_update_list', self.update_theme_list)
|
||||
Registry().register_function('config_screen_changed', self.regenerate_service_items)
|
||||
Registry().register_function('theme_update_global', self.theme_change)
|
||||
|
@ -153,6 +153,7 @@ class TestActionList(TestCase, TestMixin):
|
||||
"""
|
||||
Prepare the tests
|
||||
"""
|
||||
self.setup_application()
|
||||
self.action_list = ActionList.get_instance()
|
||||
self.build_settings()
|
||||
self.settings = Settings()
|
||||
|
@ -155,7 +155,7 @@ def test_check_same_instance():
|
||||
assert first_instance is second_instance, 'Two UiStrings objects should be the same instance'
|
||||
|
||||
|
||||
def test_translate(self):
|
||||
def test_translate():
|
||||
"""
|
||||
Test the translate() function
|
||||
"""
|
||||
|
@ -42,8 +42,8 @@ class TestProjectorManager(TestCase, TestMixin):
|
||||
"""
|
||||
Create the UI and setup necessary options
|
||||
"""
|
||||
self.build_settings()
|
||||
self.setup_application()
|
||||
self.build_settings()
|
||||
Registry.create()
|
||||
with patch('openlp.core.lib.projector.db.init_url') as mocked_init_url:
|
||||
if os.path.exists(TEST_DB):
|
||||
|
@ -64,8 +64,8 @@ class ProjectorSourceFormTest(TestCase, TestMixin):
|
||||
Set up anything necessary for all tests
|
||||
"""
|
||||
mocked_init_url.return_value = 'sqlite:///{}'.format(TEST_DB)
|
||||
self.build_settings()
|
||||
self.setup_application()
|
||||
self.build_settings()
|
||||
Registry.create()
|
||||
# Do not try to recreate if we've already been created from a previous test
|
||||
if not hasattr(self, 'projectordb'):
|
||||
|
@ -41,8 +41,8 @@ class TestThemeManager(TestCase, TestMixin):
|
||||
"""
|
||||
Create the UI
|
||||
"""
|
||||
self.build_settings()
|
||||
self.setup_application()
|
||||
self.build_settings()
|
||||
Registry.create()
|
||||
self.theme_manager = ThemeManager()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user