def test_lookup_converts_uri_metadata_to_track(audio, config, track_uri): backend = actor.StreamBackend(audio=audio, config=config) result = backend.library.lookup(track_uri) assert len(result) == 1 track = result[0] assert track.uri == track_uri assert track.length == 4406
def test_lookup_converts_uri_metadata_to_track(audio, config, track_uri): backend = actor.StreamBackend(audio=audio, config=config) result = backend.library.lookup(track_uri) assert result == [Track(length=4406, uri=track_uri)]
def test_lookup_respects_blacklist_globbing(audio, config, track_uri): blacklist_glob = path.path_to_uri(path_to_data_dir('')) + '*' config['stream']['metadata_blacklist'].append(blacklist_glob) backend = actor.StreamBackend(audio=audio, config=config) assert backend.library.lookup(track_uri) == [Track(uri=track_uri)]
def test_lookup_respects_blacklist(audio, config, track_uri): config['stream']['metadata_blacklist'].append(track_uri) backend = actor.StreamBackend(audio=audio, config=config) assert backend.library.lookup(track_uri) == [Track(uri=track_uri)]
def test_lookup_ignores_unknown_scheme(audio, config): backend = actor.StreamBackend(audio=audio, config=config) assert backend.library.lookup('http://example.com') == []
def backend(audio, config, scanner): return actor.StreamBackend(audio=audio, config=config)