Changes in radio.net
This commit is contained in:
@@ -17,7 +17,5 @@ def test_get_config_schema():
|
||||
|
||||
schema = ext.get_config_schema()
|
||||
|
||||
assert 'username' in schema
|
||||
assert 'password' in schema
|
||||
assert 'language' in schema
|
||||
assert 'min_bitrate' in schema
|
||||
|
||||
@@ -5,48 +5,24 @@ from mopidy_radionet.radionet import RadioNetClient
|
||||
|
||||
class RadioNetClientTest(unittest.TestCase):
|
||||
|
||||
username = 'alice666.9'
|
||||
password = 'secret'
|
||||
|
||||
def test_get_api_key(self):
|
||||
radionet = RadioNetClient()
|
||||
radionet.get_api_key()
|
||||
|
||||
self.assertIsNotNone(radionet.api_key)
|
||||
|
||||
def test_login(self):
|
||||
radionet = RadioNetClient()
|
||||
radionet.login(self.username, self.password)
|
||||
self.assertEqual(radionet.user_login, self.username)
|
||||
|
||||
def test_get_bookmarks(self):
|
||||
radionet = RadioNetClient()
|
||||
radionet.login(self.username, self.password)
|
||||
radionet.get_bookmarks()
|
||||
self.assertIsNotNone(radionet.station_bookmarks)
|
||||
|
||||
def test_get_bookmarks_station_streams(self):
|
||||
radionet = RadioNetClient()
|
||||
radionet.login(self.username, self.password)
|
||||
radionet.get_bookmarks()
|
||||
radionet.get_my_stations_streams()
|
||||
self.assertGreater(len(radionet.fav_stations), 0)
|
||||
|
||||
def test_get_top_stations(self):
|
||||
radionet = RadioNetClient()
|
||||
radionet.login(self.username, self.password)
|
||||
radionet.get_top_stations()
|
||||
self.assertGreater(len(radionet.top_stations), 0)
|
||||
|
||||
def test_get_local_stations(self):
|
||||
radionet = RadioNetClient()
|
||||
radionet.login(self.username, self.password)
|
||||
radionet.get_local_stations()
|
||||
self.assertGreater(len(radionet.local_stations), 0)
|
||||
|
||||
def test_do_search(self):
|
||||
radionet = RadioNetClient()
|
||||
radionet.login(self.username, self.password)
|
||||
radionet.do_search("radio ram")
|
||||
self.assertGreater(len(radionet.search_results), 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user