diff --git a/tests/functional/openlp_core_ui/__init__.py b/tests/functional/openlp_core_ui/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/functional/openlp_core_ui/test_starttimedialog.py b/tests/functional/openlp_core_ui/test_starttimedialog.py index 5bac62229..f36852b62 100644 --- a/tests/functional/openlp_core_ui/test_starttimedialog.py +++ b/tests/functional/openlp_core_ui/test_starttimedialog.py @@ -2,9 +2,10 @@ Package to test the openlp.core.ui package. """ import sys - from unittest import TestCase + from mock import MagicMock + from openlp.core.ui import starttimeform from PyQt4 import QtCore, QtGui, QtTest @@ -14,10 +15,15 @@ class TestStartTimeDialog(TestCase): """ Create the UI """ - self.app = QtGui.QApplication(sys.argv) + self.app = QtGui.QApplication([]) self.window = QtGui.QMainWindow() self.form = starttimeform.StartTimeForm(self.window) + def tearDown(self): + del self.form + del self.window + del self.app + def ui_defaults_test(self): """ Test StartTimeDialog defaults @@ -40,7 +46,7 @@ class TestStartTimeDialog(TestCase): Test StartTimeDialog display initialisation """ #GIVEN: A service item with with time - mocked_serviceitem = MagicMock() + mocked_serviceitem = MagicMock() mocked_serviceitem.start_time = 61 mocked_serviceitem.end_time = 3701