forked from openlp/openlp
Fix tests
This commit is contained in:
parent
1e5c187552
commit
2785fbaa2d
@ -185,16 +185,16 @@ class TestDB(TestCase):
|
|||||||
"""
|
"""
|
||||||
# GIVEN: A mocked song and songbook
|
# GIVEN: A mocked song and songbook
|
||||||
song = Song()
|
song = Song()
|
||||||
song.songbookentries = []
|
song.songbook_entries = []
|
||||||
songbook = Book()
|
songbook = Book()
|
||||||
songbook.name = "Thy Word"
|
songbook.name = "Thy Word"
|
||||||
|
|
||||||
# WHEN: We add two songbooks to a Song
|
# WHEN: We add two songbooks to a Song
|
||||||
song.add_songbookentry(songbook, "120")
|
song.add_songbook_entry(songbook, "120")
|
||||||
song.add_songbookentry(songbook, "550A")
|
song.add_songbook_entry(songbook, "550A")
|
||||||
|
|
||||||
# THEN: The song should have two songbook entries
|
# THEN: The song should have two songbook entries
|
||||||
self.assertEqual(len(song.songbookentries), 2, 'There should be two Songbook entries.')
|
self.assertEqual(len(song.songbook_entries), 2, 'There should be two Songbook entries.')
|
||||||
|
|
||||||
def test_upgrade_old_song_db(self):
|
def test_upgrade_old_song_db(self):
|
||||||
"""
|
"""
|
||||||
|
@ -159,14 +159,15 @@ class TestMediaItem(TestCase, TestMixin):
|
|||||||
song.title = 'My Song'
|
song.title = 'My Song'
|
||||||
song.copyright = 'My copyright'
|
song.copyright = 'My copyright'
|
||||||
song.authors_songs = []
|
song.authors_songs = []
|
||||||
|
song.songbook_entries = []
|
||||||
song.ccli_number = ''
|
song.ccli_number = ''
|
||||||
book1 = MagicMock()
|
book1 = MagicMock()
|
||||||
book1.name = "My songbook"
|
book1.name = "My songbook"
|
||||||
book2 = MagicMock()
|
book2 = MagicMock()
|
||||||
book2.name = "Thy songbook"
|
book2.name = "Thy songbook"
|
||||||
song.songbookentries = []
|
song.songbookentries = []
|
||||||
song.add_songbookentry(book1, '12')
|
song.add_songbook_entry(book1, '12')
|
||||||
song.add_songbookentry(book2, '502A')
|
song.add_songbook_entry(book2, '502A')
|
||||||
service_item = ServiceItem(None)
|
service_item = ServiceItem(None)
|
||||||
|
|
||||||
# WHEN: I generate the Footer with default settings
|
# WHEN: I generate the Footer with default settings
|
||||||
|
Loading…
Reference in New Issue
Block a user