Example #1
0
 def test_get_playlists(self):
     self.shell.props.playlist_manager.get_playlists.return_value = [
         PlaylistStub("my_source", entries=[EntryStub(1)])
     ]
     rb = RBHandler(self.shell)
     playlists = rb.get_playlists()
     self.assertEquals(len(playlists), 1)
Example #2
0
 def test_get_playlists_without_entries_works(self):
     self.shell.props.playlist_manager.get_playlists.return_value = [PlaylistStub("my_source")]
     rb = RBHandler(self.shell)
     playlists = rb.get_playlists()
     playlist = get_playlist(playlists[0])
     self.assertEquals(playlist["entries"], [])