def test_album_media_link_with_album_media_link_true( self, track, tweet_config): tweet_config.footer_config.with_album_media_link = True footer_template = FooterTemplate(track, tweet_config.footer_config) assert (footer_template.album_media_link() == 'http://spotify.com/album/11?si=g')
def test_song_media_link_with_song_media_link_true(self, track, tweet_config): tweet_config.footer_config.with_song_media_link = True footer_template = FooterTemplate(track, tweet_config.footer_config) assert footer_template.song_media_link( ) == 'http://spotify.com/track/1'
def test_to_footer_default_config(self, track, tweet_config): tweet_config.footer_config.with_gorrion_hashtags = False tweet_config.footer_config.with_album_hashtag = False tweet_config.footer_config.with_artists_hashtag = False tweet_config.footer_config.with_song_media_link = False tweet_config.footer_config.with_album_media_link = False footer_template = FooterTemplate(track, tweet_config.footer_config) assert footer_template.to_footer() == ''
def test_to_footer_with_song_media_link_only(self, track, tweet_config): tweet_config.footer_config.with_gorrion_hashtags = False tweet_config.footer_config.with_album_hashtag = False tweet_config.footer_config.with_artists_hashtag = False tweet_config.footer_config.with_song_media_link = True tweet_config.footer_config.with_album_media_link = False footer_template = FooterTemplate(track, tweet_config.footer_config) assert footer_template.to_footer() == 'http://spotify.com/track/1'
def test_to_footer_with_artists_hashtag_only(self, track, tweet_config): tweet_config.footer_config.with_gorrion_hashtags = False tweet_config.footer_config.with_album_hashtag = False tweet_config.footer_config.with_artists_hashtag = True tweet_config.footer_config.with_song_media_link = False tweet_config.footer_config.with_album_media_link = False footer_template = FooterTemplate(track, tweet_config.footer_config) assert footer_template.to_footer() == '#ElyGuerra\n\n'
def test_to_footer_with_hashtags_only(self, track, tweet_config): tweet_config.footer_config.with_gorrion_hashtags = True tweet_config.footer_config.with_album_hashtag = True tweet_config.footer_config.with_artists_hashtag = True tweet_config.footer_config.with_song_media_link = False tweet_config.footer_config.with_album_media_link = False footer_template = FooterTemplate(track, tweet_config.footer_config) assert footer_template.to_footer() == ('#gorrion #NowPlaying ' '#PaMorirseDeAmor ' '#ElyGuerra\n\n')
def test_build_hashtag(self, track, tweet_config): footer_template = FooterTemplate(track, tweet_config.footer_config) assert footer_template._build_hashtag('') == '' assert footer_template._build_hashtag('alpha-only') == '#Alphaonly' assert footer_template._build_hashtag('digit-only') == '#Digitonly' assert footer_template._build_hashtag('no more') == '#NoMore' assert footer_template._build_hashtag(' alone ') == '#Alone' assert (footer_template._build_hashtag('thIS iS a AM vAlID') == '#ThisIsAAMValid')
def test_album_media_link_with_album_media_link_false( self, track, tweet_config): tweet_config.footer_config.with_album_media_link = False footer_template = FooterTemplate(track, tweet_config.footer_config) assert footer_template.album_media_link() == ''
def test_artists_hashtags_with_artists_hashtag_false( self, track, tweet_config): tweet_config.footer_config.with_artists_hashtag = False footer_template = FooterTemplate(track, tweet_config.footer_config) assert footer_template.artists_hashtags() == ''
def test_artists_hashtags_with_artists_hashtag_true( self, track, tweet_config): tweet_config.footer_config.with_artists_hashtag = True footer_template = FooterTemplate(track, tweet_config.footer_config) assert footer_template.artists_hashtags() == '#ElyGuerra'
def test_album_hashtags_with_album_hashtag_true(self, track, tweet_config): tweet_config.footer_config.with_album_hashtag = True footer_template = FooterTemplate(track, tweet_config.footer_config) assert footer_template.album_hashtags() == '#PaMorirseDeAmor '
def test_gorrion_hashtags_with_gorrion_hashtags_false( self, track, tweet_config): tweet_config.footer_config.with_gorrion_hashtags = False footer_template = FooterTemplate(track, tweet_config.footer_config) assert footer_template.gorrion_hashtags() == ''
def test_gorrion_hashtags_with_gorrion_hashtags_true( self, track, tweet_config): tweet_config.footer_config.with_gorrion_hashtags = True footer_template = FooterTemplate(track, tweet_config.footer_config) assert footer_template.gorrion_hashtags() == '#gorrion #NowPlaying '
def test_constructor(self, track, tweet_config): footer_template = FooterTemplate(track, tweet_config.footer_config) assert footer_template._track == track assert footer_template._config == tweet_config.footer_config