lastfm: remove tasteometer

They removed this feature from the API. What exactly is the point of
Last.fm now, just advertising?
This commit is contained in:
mutantmonkey
2016-03-06 14:35:19 -08:00
parent 64d7088adb
commit 984dba9b4b
2 changed files with 2 additions and 96 deletions

View File

@@ -6,7 +6,7 @@ author: mutantmonkey <mutantmonkey@mutantmonkey.in>
import re
import unittest
from mock import MagicMock, Mock
from modules.lastfm import now_playing, tasteometer
from modules.lastfm import now_playing
class TestLastfm(unittest.TestCase):
@@ -32,36 +32,3 @@ class TestLastfm(unittest.TestCase):
out = self.phenny.say.call_args[0][0]
m = re.match('^{0} listened to ".+" by .+ on .+ .*$'.format(self.user1), out, flags=re.UNICODE)
self.assertTrue(m)
def test_tasteometer(self):
def mock_group(x):
if x == 2:
return self.user1
else:
return self.user2
input = Mock(group=mock_group)
tasteometer(self.phenny, input)
out = self.phenny.say.call_args[0][0]
m = re.match("^{0}'s and {1}'s musical compatibility rating is .*"\
" they don't have any artists in common.$".
format(self.user1, self.user2), out, flags=re.UNICODE)
self.assertTrue(m)
def test_tasteometer_sender(self):
def mock_group(x):
if x == 2:
return self.user1
else:
return ''
input = Mock(group=mock_group)
input.nick = self.user2
tasteometer(self.phenny, input)
out = self.phenny.say.call_args[0][0]
m = re.match("^{0}'s and {1}'s musical compatibility rating is .*"\
" they don't have any artists in common.$".
format(self.user1, self.user2), out, flags=re.UNICODE)
self.assertTrue(m)