← Back to team overview

openlp-core team mailing list archive

Re: [Merge] lp:~sam92/openlp/multiple-songbooks into lp:openlp

 

Review: Needs Fixing

"songbookentry" is not one word, it is two. Please use "songbook_entries" and "add_songbook_entry".

Diff comments:

> 
> === modified file 'tests/functional/openlp_plugins/songs/test_mediaitem.py'
> --- tests/functional/openlp_plugins/songs/test_mediaitem.py	2016-01-05 19:32:12 +0000
> +++ tests/functional/openlp_plugins/songs/test_mediaitem.py	2016-01-08 23:15:07 +0000
> @@ -152,15 +152,21 @@
>  
>      def build_song_footer_base_songbook_test(self):
>          """
> -        Test build songs footer with basic song and a songbook
> +        Test build songs footer with basic song and multiple songbooks
>          """
>          # GIVEN: A Song and a Service Item
> -        mock_song = MagicMock()
> +        mock_song = Song()

If you're going to change the song object from a Mock to a real song, please change the name too.

>          mock_song.title = 'My Song'
>          mock_song.copyright = 'My copyright'
> -        mock_song.book = MagicMock()
> -        mock_song.book.name = "My songbook"
> -        mock_song.song_number = 12
> +        mock_song.authors_songs = []
> +        mock_song.ccli_number = ''
> +        book1 = MagicMock()
> +        book1.name = "My songbook"
> +        book2 = MagicMock()
> +        book2.name = "Thy songbook"
> +        mock_song.songbookentries = []
> +        mock_song.add_songbookentry(book1, '12')
> +        mock_song.add_songbookentry(book2, '502A')
>          service_item = ServiceItem(None)
>  
>          # WHEN: I generate the Footer with default settings


-- 
https://code.launchpad.net/~sam92/openlp/multiple-songbooks/+merge/282081
Your team OpenLP Core is subscribed to branch lp:openlp.


References