コード例 #1
0
    def test_full_song_status(self, twitter, track):
        gorrion = Gorrion(MagicMock(), twitter, MagicMock())

        status = gorrion.build_status(track, TweetSongConfig())
        assert status == ('Now listening 🔊🎶:\n\n'
                          'Track: 1. Peligro\n'
                          'Album: Pa morirse de amor\n'
                          'Artist: Ely Guerra\n\n'
                          '#gorrion #NowPlaying #ElyGuerra\n\n'
                          'http://spotify.com/track/1')
コード例 #2
0
    def test_short_album_status(self, twitter, track):
        twitter.MAX_TWEET_LENGTH = 10
        gorrion = Gorrion(MagicMock(), twitter, MagicMock())

        status = gorrion.build_status(track, TweetAlbumConfig())
        assert status == ('Now listening 🔊🎶:\n\n'
                          'Album: Pa morirse de amor\n'
                          'Artist: Ely Guerra\n'
                          'Tracks: 19\n'
                          'Release: 2006\n\n'
                          '#gorrion #NowPlaying #PaMorirseDeAmor\n\n'
                          'http://spotify.com/album/11?si=g')