openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #18888
[Merge] lp:~raoul-snyman/openlp/tests into lp:openlp
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/tests into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/tests/+merge/144064
Get Tim's two tests running.
--
https://code.launchpad.net/~raoul-snyman/openlp/tests/+merge/144064
Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/tests into lp:openlp.
=== added file 'tests/functional/openlp_core_ui/__init__.py'
=== modified file 'tests/functional/openlp_core_ui/test_starttimedialog.py'
--- tests/functional/openlp_core_ui/test_starttimedialog.py 2013-01-20 20:53:58 +0000
+++ tests/functional/openlp_core_ui/test_starttimedialog.py 2013-01-21 07:29:20 +0000
@@ -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 @@
"""
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 @@
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
Follow ups