From 2785fbaa2d46a491241f71f7d7cd1c6b8fa0ee6c Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Sat, 9 Jan 2016 16:53:49 +0100 Subject: [PATCH] Fix tests --- tests/functional/openlp_plugins/songs/test_db.py | 8 ++++---- tests/functional/openlp_plugins/songs/test_mediaitem.py | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/functional/openlp_plugins/songs/test_db.py b/tests/functional/openlp_plugins/songs/test_db.py index 9aff5b9a1..b2955b87e 100644 --- a/tests/functional/openlp_plugins/songs/test_db.py +++ b/tests/functional/openlp_plugins/songs/test_db.py @@ -185,16 +185,16 @@ class TestDB(TestCase): """ # GIVEN: A mocked song and songbook song = Song() - song.songbookentries = [] + song.songbook_entries = [] songbook = Book() songbook.name = "Thy Word" # WHEN: We add two songbooks to a Song - song.add_songbookentry(songbook, "120") - song.add_songbookentry(songbook, "550A") + song.add_songbook_entry(songbook, "120") + song.add_songbook_entry(songbook, "550A") # 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): """ diff --git a/tests/functional/openlp_plugins/songs/test_mediaitem.py b/tests/functional/openlp_plugins/songs/test_mediaitem.py index 2aa5c1c6b..c94469050 100644 --- a/tests/functional/openlp_plugins/songs/test_mediaitem.py +++ b/tests/functional/openlp_plugins/songs/test_mediaitem.py @@ -159,14 +159,15 @@ class TestMediaItem(TestCase, TestMixin): song.title = 'My Song' song.copyright = 'My copyright' song.authors_songs = [] + song.songbook_entries = [] song.ccli_number = '' book1 = MagicMock() book1.name = "My songbook" book2 = MagicMock() book2.name = "Thy songbook" song.songbookentries = [] - song.add_songbookentry(book1, '12') - song.add_songbookentry(book2, '502A') + song.add_songbook_entry(book1, '12') + song.add_songbook_entry(book2, '502A') service_item = ServiceItem(None) # WHEN: I generate the Footer with default settings