forked from openlp/openlp
fixed test order
This commit is contained in:
parent
f715810ce9
commit
85f64ddae6
@ -36,6 +36,20 @@ class TestCustomFrom(TestCase):
|
|||||||
del self.main_window
|
del self.main_window
|
||||||
del self.app
|
del self.app
|
||||||
|
|
||||||
|
def load_themes_test(self):
|
||||||
|
"""
|
||||||
|
Test the load_themes() method.
|
||||||
|
"""
|
||||||
|
# GIVEN: A mocked QDialog.exec_() method
|
||||||
|
with patch(u'PyQt4.QtGui.QDialog.exec_') as mocked_exec:
|
||||||
|
theme_list = [u'First Theme', u'Second Theme']
|
||||||
|
# WHEN: Show the dialog and add pass a theme list.
|
||||||
|
self.form.exec_()
|
||||||
|
self.form.load_themes(theme_list)
|
||||||
|
|
||||||
|
# THEN: There should be three items in the combo box.
|
||||||
|
assert self.form.theme_combo_box.count() == 3, u'There should be three items (themes) in the combo box.'
|
||||||
|
|
||||||
def load_custom_test(self):
|
def load_custom_test(self):
|
||||||
"""
|
"""
|
||||||
Test the load_custom() method.
|
Test the load_custom() method.
|
||||||
@ -63,16 +77,3 @@ class TestCustomFrom(TestCase):
|
|||||||
# THEN: One slide should be added.
|
# THEN: One slide should be added.
|
||||||
assert self.form.slide_list_view.count() == 1, u'There should be one slide added.'
|
assert self.form.slide_list_view.count() == 1, u'There should be one slide added.'
|
||||||
|
|
||||||
def load_themes_test(self):
|
|
||||||
"""
|
|
||||||
Test the load_themes() method.
|
|
||||||
"""
|
|
||||||
# GIVEN: A mocked QDialog.exec_() method
|
|
||||||
with patch(u'PyQt4.QtGui.QDialog.exec_') as mocked_exec:
|
|
||||||
theme_list = [u'First Theme', u'Second Theme']
|
|
||||||
# WHEN: Show the dialog and add pass a theme list.
|
|
||||||
self.form.exec_()
|
|
||||||
self.form.load_themes(theme_list)
|
|
||||||
|
|
||||||
# THEN: There should be three items in the combo box.
|
|
||||||
assert self.form.theme_combo_box.count() == 3, u'There should be three items (themes) in the combo box.'
|
|
||||||
|
Loading…
Reference in New Issue
Block a user