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

        published_track = PublishedTweet('1', 'track', None)
        published_lyrics = gorrion.publish_lyrics(published_track, song)

        assert published_lyrics == []
コード例 #2
0
    def test_publish_lyrics(self, twitter, song, lyric):
        gorrion = Gorrion(MagicMock(), twitter, MagicMock())

        published_track = PublishedTweet('1', 'track', None)
        song.lyric = lyric
        published_lyrics = gorrion.publish_lyrics(published_track, song)

        assert published_lyrics == [
            PublishedTweet(id_='fake-status-id', tweet='lyric1', entity=None),
            PublishedTweet(id_='fake-status-id', tweet='lyric2', entity=None),
        ]