Пример #1
0
    def test_add_songbooks(self):
        """
        Test that adding songbooks to a song works correctly
        """
        # GIVEN: A mocked song and songbook
        song = Song()
        song.songbook_entries = []
        songbook = Book()
        songbook.name = "Thy Word"

        # WHEN: We add two songbooks to a Song
        song.add_songbook_entry(songbook, "120")
        song.add_songbook_entry(songbook, "550A")

        # THEN: The song should have two songbook entries
        self.assertEqual(len(song.songbook_entries), 2, 'There should be two Songbook entries.')