forked from openlp/openlp
minor fixes
This commit is contained in:
parent
9051692dba
commit
17f33712db
@ -51,4 +51,4 @@ class TestMixin(object):
|
|||||||
Settings().set_filename(self.ini_file)
|
Settings().set_filename(self.ini_file)
|
||||||
|
|
||||||
def destroy_settings(self):
|
def destroy_settings(self):
|
||||||
os.unlink(Settings().fileName())
|
os.unlink(Settings().fileName())
|
||||||
|
@ -31,8 +31,6 @@ Interface tests to test the themeManager class and related methods.
|
|||||||
"""
|
"""
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
from PyQt4 import QtGui, QtCore
|
|
||||||
|
|
||||||
from openlp.core.common import Registry, Settings
|
from openlp.core.common import Registry, Settings
|
||||||
from openlp.core.ui import ThemeManager
|
from openlp.core.ui import ThemeManager
|
||||||
from tests.functional import patch, MagicMock
|
from tests.functional import patch, MagicMock
|
||||||
@ -49,11 +47,6 @@ class TestThemeManager(TestCase, TestMixin):
|
|||||||
"""
|
"""
|
||||||
self.build_settings()
|
self.build_settings()
|
||||||
self.get_application()
|
self.get_application()
|
||||||
old_app_instance = QtCore.QCoreApplication.instance()
|
|
||||||
if old_app_instance is None:
|
|
||||||
self.app = QtGui.QApplication([])
|
|
||||||
else:
|
|
||||||
self.app = old_app_instance
|
|
||||||
Registry.create()
|
Registry.create()
|
||||||
self.theme_manager = ThemeManager()
|
self.theme_manager = ThemeManager()
|
||||||
|
|
||||||
@ -72,7 +65,7 @@ class TestThemeManager(TestCase, TestMixin):
|
|||||||
self.theme_manager.load_first_time_themes = MagicMock()
|
self.theme_manager.load_first_time_themes = MagicMock()
|
||||||
Settings().setValue('themes/global theme', 'my_theme')
|
Settings().setValue('themes/global theme', 'my_theme')
|
||||||
|
|
||||||
# WHEN: the initialistion is run
|
# WHEN: the initialisation is run
|
||||||
self.theme_manager.bootstrap_initialise()
|
self.theme_manager.bootstrap_initialise()
|
||||||
|
|
||||||
# THEN:
|
# THEN:
|
||||||
|
Loading…
Reference in New Issue
Block a user