def test_http_album(botmock): msg = 'http://open.spotify.com/album/5O8MKoOZoTK1JfD1tAN2TA' title = '[Spotify] Organ - Nekrofiilis (2001)' assert ('#channel', title) == handle_privmsg(botmock, None, '#channel', msg)
def test_http_artist(botmock): msg = 'http://open.spotify.com/artist/3MXhtYDNuzQQmLfOKFgPiI' regex = '\[Spotify\] Einojuhani Rautavaara( \(Genre: \S.+\))?' check_re(regex, handle_privmsg(botmock, None, '#channel', msg)[1])
def test_spotify_track(botmock): msg = 'spotify:track:46c5HqyYtOkpjdp193KCln' title = '[Spotify] Ultra Bra - Sinä päivänä kun synnyin - Heikko valo' assert ('#channel', title) == handle_privmsg(botmock, None, '#channel', msg)
def test_http_album(): msg = 'http://open.spotify.com/album/5O8MKoOZoTK1JfD1tAN2TA' title = '[Spotify] Organ - Nekrofiilis (2001)' eq_(('#channel', title), handle_privmsg(bot, None, '#channel', msg))
def test_http_artist(): msg = 'http://open.spotify.com/artist/3MXhtYDNuzQQmLfOKFgPiI' regex = '\[Spotify\] Einojuhani Rautavaara( \(Genre: \S.+\))?' check_re(regex, handle_privmsg(bot, None, '#channel', msg)[1])
def test_spotify_track(): msg = 'spotify:track:46c5HqyYtOkpjdp193KCln' title = '[Spotify] Ultra Bra - Sinä päivänä kun synnyin - Heikko valo' eq_(('#channel', title), handle_privmsg(bot, None, '#channel', msg))