forked from openlp/openlp
Revert some changes - functional Ok. Interfaces mess
This commit is contained in:
parent
62b1653c46
commit
5c0fa26289
@ -7,3 +7,7 @@ sip.setapi(u'QTime', 2)
|
||||
sip.setapi(u'QUrl', 2)
|
||||
sip.setapi(u'QVariant', 2)
|
||||
|
||||
from PyQt4 import QtGui
|
||||
|
||||
# Only one QApplication can be created. Use QtGui.QApplication.instance() when you need to "create" a QApplication.
|
||||
application = QtGui.QApplication([])
|
||||
|
@ -26,7 +26,7 @@ class TestPluginManager(TestCase):
|
||||
Settings().set_filename(self.ini_file)
|
||||
Registry.create()
|
||||
Registry().register(u'service_list', MagicMock())
|
||||
self.app = QtGui.QApplication([])
|
||||
self.app = QtGui.QApplication.instance()
|
||||
self.main_window = QtGui.QMainWindow()
|
||||
Registry().register(u'main_window', self.main_window)
|
||||
self.plugins_dir = os.path.abspath(os.path.join(os.path.basename(__file__), u'..', u'openlp', u'plugins'))
|
||||
|
@ -15,7 +15,7 @@ class TestStartFileRenameForm(TestCase):
|
||||
Create the UI
|
||||
"""
|
||||
Registry.create()
|
||||
self.app = QtGui.QApplication([])
|
||||
self.app = QtGui.QApplication.instance()
|
||||
self.main_window = QtGui.QMainWindow()
|
||||
Registry().register(u'main_window', self.main_window)
|
||||
self.form = filerenameform.FileRenameForm()
|
||||
|
@ -3,7 +3,7 @@
|
||||
"""
|
||||
|
||||
from unittest import TestCase
|
||||
from mock import MagicMock
|
||||
from mock import MagicMock, patch
|
||||
|
||||
from PyQt4 import QtGui
|
||||
|
||||
@ -11,17 +11,18 @@ from openlp.core.lib import Registry, ScreenList
|
||||
from openlp.core.ui.mainwindow import MainWindow
|
||||
|
||||
|
||||
class TestStartNoteDialog(TestCase):
|
||||
class TestServiceManager(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
"""
|
||||
Create the UI
|
||||
"""
|
||||
Registry.create()
|
||||
self.app = QtGui.QApplication([])
|
||||
self.app = QtGui.QApplication.instance()
|
||||
ScreenList.create(self.app.desktop())
|
||||
Registry().register(u'application', MagicMock())
|
||||
self.main_window = MainWindow()
|
||||
with patch(u'openlp.core.lib.PluginManager'):
|
||||
self.main_window = MainWindow()
|
||||
self.service_manager = Registry().get(u'service_manager')
|
||||
|
||||
def tearDown(self):
|
||||
|
@ -17,7 +17,7 @@ class TestStartNoteDialog(TestCase):
|
||||
Create the UI
|
||||
"""
|
||||
Registry.create()
|
||||
self.app = QtGui.QApplication([])
|
||||
self.app = QtGui.QApplication.instance()
|
||||
self.main_window = QtGui.QMainWindow()
|
||||
Registry().register(u'main_window', self.main_window)
|
||||
self.form = servicenoteform.ServiceNoteForm()
|
||||
|
@ -17,7 +17,7 @@ class TestStartTimeDialog(TestCase):
|
||||
Create the UI
|
||||
"""
|
||||
Registry.create()
|
||||
self.app = QtGui.QApplication([])
|
||||
self.app = QtGui.QApplication.instance()
|
||||
self.main_window = QtGui.QMainWindow()
|
||||
Registry().register(u'main_window', self.main_window)
|
||||
self.form = starttimeform.StartTimeForm()
|
||||
|
Loading…
Reference in New Issue
Block a user