Code cleanup
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
from unittest import mock
|
||||
|
||||
|
||||
def test_browse_root(library):
|
||||
results = library.browse('radionet:root');
|
||||
results = library.browse('radionet:root')
|
||||
assert 8 == len(results)
|
||||
|
||||
|
||||
def test_browse_localstations(library):
|
||||
results = library.browse('radionet:localstations');
|
||||
results = library.browse('radionet:localstations')
|
||||
assert len(results) > 0
|
||||
|
||||
page_uri = results[0].uri if results is not None else None
|
||||
@@ -19,12 +18,12 @@ def test_browse_localstations(library):
|
||||
|
||||
|
||||
def test_browse_topstations(library):
|
||||
results = library.browse('radionet:topstations');
|
||||
results = library.browse('radionet:topstations')
|
||||
assert len(results) > 0
|
||||
|
||||
|
||||
def test_browse_genres(library):
|
||||
results = library.browse('radionet:genres');
|
||||
results = library.browse('radionet:genres')
|
||||
assert len(results) > 0
|
||||
|
||||
cat_uri = results[0].uri if results is not None else None
|
||||
@@ -47,7 +46,7 @@ def test_browse_genres(library):
|
||||
|
||||
|
||||
def test_browse_topics(library):
|
||||
results = library.browse('radionet:topics');
|
||||
results = library.browse('radionet:topics')
|
||||
assert len(results) > 0
|
||||
|
||||
cat_uri = results[0].uri if results is not None else None
|
||||
@@ -71,7 +70,7 @@ def test_browse_topics(library):
|
||||
|
||||
|
||||
def test_browse_languages(library):
|
||||
results = library.browse('radionet:languages');
|
||||
results = library.browse('radionet:languages')
|
||||
assert len(results) > 0
|
||||
|
||||
cat_uri = results[5].uri if results is not None else None
|
||||
@@ -95,7 +94,7 @@ def test_browse_languages(library):
|
||||
|
||||
|
||||
def test_browse_cities(library):
|
||||
results = library.browse('radionet:cities');
|
||||
results = library.browse('radionet:cities')
|
||||
assert len(results) > 0
|
||||
|
||||
cat_uri = results[0].uri if results is not None else None
|
||||
@@ -119,7 +118,7 @@ def test_browse_cities(library):
|
||||
|
||||
|
||||
def test_browse_countries(library):
|
||||
results = library.browse('radionet:countries');
|
||||
results = library.browse('radionet:countries')
|
||||
assert len(results) > 0
|
||||
|
||||
cat_uri = results[0].uri if results is not None else None
|
||||
@@ -143,11 +142,10 @@ def test_browse_countries(library):
|
||||
|
||||
|
||||
def test_browse_favorites(library):
|
||||
results = library.browse('radionet:favorites');
|
||||
results = library.browse('radionet:favorites')
|
||||
assert 1 == len(results)
|
||||
|
||||
|
||||
|
||||
def test_search(library):
|
||||
result = library.search({'any': ['radio ram']})
|
||||
|
||||
@@ -161,7 +159,6 @@ def test_search(library):
|
||||
|
||||
|
||||
def test_lookup(library):
|
||||
|
||||
results = library.browse('radionet:favorites')
|
||||
assert 1 == len(results)
|
||||
|
||||
@@ -170,7 +167,6 @@ def test_lookup(library):
|
||||
|
||||
|
||||
def test_track_by_slug(library):
|
||||
|
||||
results = library.lookup('radionet:track:dancefm')
|
||||
assert 1 == len(results)
|
||||
assert results[0].uri == 'radionet:track:2180'
|
||||
|
||||
Reference in New Issue
Block a user