forked from openlp/openlp
Add mocks
This commit is contained in:
parent
3b34721967
commit
0ec8b40294
@ -57,7 +57,9 @@ class TestMainWindow(TestCase, TestMixin):
|
|||||||
patch('openlp.core.ui.mainwindow.QtWidgets.QToolBox') as mocked_q_tool_box_class, \
|
patch('openlp.core.ui.mainwindow.QtWidgets.QToolBox') as mocked_q_tool_box_class, \
|
||||||
patch('openlp.core.ui.mainwindow.QtWidgets.QMainWindow.addDockWidget') as mocked_add_dock_method, \
|
patch('openlp.core.ui.mainwindow.QtWidgets.QMainWindow.addDockWidget') as mocked_add_dock_method, \
|
||||||
patch('openlp.core.ui.mainwindow.ThemeManager') as mocked_theme_manager, \
|
patch('openlp.core.ui.mainwindow.ThemeManager') as mocked_theme_manager, \
|
||||||
patch('openlp.core.ui.mainwindow.Renderer') as mocked_renderer:
|
patch('openlp.core.ui.mainwindow.Renderer') as mocked_renderer, \
|
||||||
|
patch('openlp.core.ui.mainwindow.websockets.WebSocketServer') as mocked_websocketserver, \
|
||||||
|
patch('openlp.core.ui.mainwindow.server.HttpServer') as mocked_httpserver:
|
||||||
self.mocked_settings_form = mocked_settings_form
|
self.mocked_settings_form = mocked_settings_form
|
||||||
self.mocked_image_manager = mocked_image_manager
|
self.mocked_image_manager = mocked_image_manager
|
||||||
self.mocked_live_controller = mocked_live_controller
|
self.mocked_live_controller = mocked_live_controller
|
||||||
|
@ -56,7 +56,9 @@ class TestMainWindow(TestCase, TestMixin):
|
|||||||
patch('openlp.core.ui.mainwindow.ServiceManager') as mocked_service_manager, \
|
patch('openlp.core.ui.mainwindow.ServiceManager') as mocked_service_manager, \
|
||||||
patch('openlp.core.ui.mainwindow.ThemeManager') as mocked_theme_manager, \
|
patch('openlp.core.ui.mainwindow.ThemeManager') as mocked_theme_manager, \
|
||||||
patch('openlp.core.ui.mainwindow.ProjectorManager') as mocked_projector_manager, \
|
patch('openlp.core.ui.mainwindow.ProjectorManager') as mocked_projector_manager, \
|
||||||
patch('openlp.core.ui.mainwindow.Renderer') as mocked_renderer:
|
patch('openlp.core.ui.mainwindow.Renderer') as mocked_renderer, \
|
||||||
|
patch('openlp.core.ui.mainwindow.websockets.WebSocketServer') as mocked_websocketserver, \
|
||||||
|
patch('openlp.core.ui.mainwindow.server.HttpServer') as mocked_httpserver:
|
||||||
self.main_window = MainWindow()
|
self.main_window = MainWindow()
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
|
@ -52,7 +52,9 @@ class TestServiceManager(TestCase, TestMixin):
|
|||||||
patch('openlp.core.ui.mainwindow.QtWidgets.QMainWindow.addDockWidget') as mocked_add_dock_method, \
|
patch('openlp.core.ui.mainwindow.QtWidgets.QMainWindow.addDockWidget') as mocked_add_dock_method, \
|
||||||
patch('openlp.core.ui.mainwindow.ThemeManager') as mocked_theme_manager, \
|
patch('openlp.core.ui.mainwindow.ThemeManager') as mocked_theme_manager, \
|
||||||
patch('openlp.core.ui.mainwindow.ProjectorManager') as mocked_projector_manager, \
|
patch('openlp.core.ui.mainwindow.ProjectorManager') as mocked_projector_manager, \
|
||||||
patch('openlp.core.ui.mainwindow.Renderer') as mocked_renderer:
|
patch('openlp.core.ui.mainwindow.Renderer') as mocked_renderer, \
|
||||||
|
patch('openlp.core.ui.mainwindow.websockets.WebSocketServer') as mocked_websocketserver, \
|
||||||
|
patch('openlp.core.ui.mainwindow.server.HttpServer') as mocked_httpserver:
|
||||||
self.main_window = MainWindow()
|
self.main_window = MainWindow()
|
||||||
self.service_manager = Registry().get('service_manager')
|
self.service_manager = Registry().get('service_manager')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user