Fix tests

This commit is contained in:
Samuel Mehrbrodt 2016-01-09 16:53:49 +01:00
parent 1e5c187552
commit 2785fbaa2d
2 changed files with 7 additions and 6 deletions

View File

@ -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):
"""

View File

@ -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