Test for bug 1404967

This commit is contained in:
Ken Roberts 2014-12-29 09:41:45 -08:00
parent 3be4f10833
commit ff185523e1
1 changed files with 13 additions and 0 deletions

View File

@ -34,6 +34,7 @@ from unittest import TestCase
from PyQt4 import QtGui from PyQt4 import QtGui
from openlp.core.common import Registry from openlp.core.common import Registry
from openlp.core.common.uistrings import UiStrings
from openlp.plugins.songs.forms.editsongform import EditSongForm from openlp.plugins.songs.forms.editsongform import EditSongForm
from tests.interfaces import MagicMock from tests.interfaces import MagicMock
from tests.helpers.testmixin import TestMixin from tests.helpers.testmixin import TestMixin
@ -136,3 +137,15 @@ class TestEditSongForm(TestCase, TestMixin):
# THEN: The no-verse-order message should be shown. # THEN: The no-verse-order message should be shown.
assert self.form.warning_label.text() == self.form.no_verse_order_entered_warning, \ assert self.form.warning_label.text() == self.form.no_verse_order_entered_warning, \
'The no-verse-order message should be shown.' 'The no-verse-order message should be shown.'
def bug_1404967_test(self):
"""
Test for CCLI label showing correct text
"""
# GIVEN; Mocked methods
form = self.form
# THEN: CCLI label should be CCLI song label
self.assertNotEquals(form.ccli_label.text(), UiStrings().CCLINumberLabel,
'CCLI label should not be "{}"'.format(UiStrings().CCLINumberLabel))
self.assertEquals(form.ccli_label.text(), UiStrings().CCLISongNumberLabel,
'CCLI label text should be "{}"'.format(UiStrings().CCLISongNumberLabel))