From 7b643b06acc894b7e52ef30e489d9c2d18551b1b Mon Sep 17 00:00:00 2001 From: suutari-olli Date: Thu, 14 Jul 2016 21:02:23 +0300 Subject: [PATCH] - Tried to make the new text work with the registry changes but failed. > Test is broken, do not merge! --- openlp/core/ui/mainwindow.py | 1 + tests/functional/openlp_core_ui/test_slidecontroller.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index ccd12727c..d4bc6b741 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -662,6 +662,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, RegistryProperties): plugin.app_startup() self.application.process_events() + def first_time(self): """ Import themes if first time diff --git a/tests/functional/openlp_core_ui/test_slidecontroller.py b/tests/functional/openlp_core_ui/test_slidecontroller.py index bbaa4b5d3..53869a365 100644 --- a/tests/functional/openlp_core_ui/test_slidecontroller.py +++ b/tests/functional/openlp_core_ui/test_slidecontroller.py @@ -718,7 +718,7 @@ class TestSlideController(TestCase): # GIVEN: A slide controller, actions needed, settins set to True. slide_controller = SlideController(None) mocked_settings = MagicMock() - mocked_settings.value.return_value = True + mocked_settings.return_value = True MockedSettings.return_value = mocked_settings slide_controller.service_item = MagicMock() slide_controller.service_item.is_media = MagicMock() @@ -727,6 +727,11 @@ class TestSlideController(TestCase): slide_controller.on_preview_add_to_service = MagicMock() slide_controller.media_reset = MagicMock() + Registry.create() + reg_value = True + Registry().set_flag('has doubleclick added item to service', reg_value) + temp = Registry().get_flag('has doubleclick added item to service') + # WHEN: on_preview_double_click is called slide_controller.on_preview_double_click()