def test_video_ref(): with pytest.raises(ValueError): translator.ref({ 'DisplayName': 'Foo', 'URI': BASEURI + '/foo', 'Type': 'video' })
def test_video_ref(): with pytest.raises(ValueError): translator.ref({ 'DisplayName': 'Foo', 'URI': BASEURI + '/foo', 'Type': 'video' })
def test_playlist(): assert translator.ref({ 'DisplayName': 'Foo', 'URI': BASEURI + '/foo', 'Type': 'container', 'TypeEx': PLAYLIST_TYPE }) == Ref.directory(uri=BASEURI+'/foo', name='Foo')
def test_album_ref(): assert translator.ref({ 'DisplayName': 'Foo', 'URI': BASEURI + '/foo', 'Type': 'container', 'TypeEx': ALBUM_TYPE }) == Ref.album(uri=BASEURI+'/foo', name='Foo')
def test_audio_broadcast_ref(): assert translator.ref({ 'DisplayName': 'Foo', 'URI': BASEURI + '/foo', 'Type': 'audio', 'TypeEx': AUDIO_BROADCAST_TYPE }) == Ref.track(uri=BASEURI+'/foo', name='Foo')
def test_artist_ref(): assert translator.ref({ 'DisplayName': 'Foo', 'URI': BASEURI + '/foo', 'Type': 'container', 'TypeEx': ARTIST_TYPE }) == Ref.artist(uri=BASEURI+'/foo', name='Foo')
def test_artist_ref(): assert translator.ref({ 'DisplayName': 'Foo', 'URI': BASEURI + '/foo', 'Type': 'container', 'TypeEx': ARTIST_TYPE }) == Ref.artist(uri=BASEURI+'/foo', name='Foo')
def test_album_ref(): assert translator.ref({ 'DisplayName': 'Foo', 'URI': BASEURI + '/foo', 'Type': 'container', 'TypeEx': ALBUM_TYPE }) == Ref.album(uri=BASEURI+'/foo', name='Foo')
def test_audio_broadcast_ref(): assert translator.ref( { "DisplayName": "Foo", "URI": BASEURI + "/foo", "Type": "audio", "TypeEx": AUDIO_BROADCAST_TYPE, } ) == Ref.track(uri=BASEURI + "/foo", name="Foo")
def test_artist_ref(): assert translator.ref( { "DisplayName": "Foo", "URI": BASEURI + "/foo", "Type": "container", "TypeEx": ARTIST_TYPE, } ) == Ref.artist(uri=BASEURI + "/foo", name="Foo")
def test_album_ref(): assert translator.ref( { "DisplayName": "Foo", "URI": BASEURI + "/foo", "Type": "container", "TypeEx": ALBUM_TYPE, } ) == Ref.album(uri=BASEURI + "/foo", name="Foo")
def test_playlist(): assert translator.ref( { "DisplayName": "Foo", "URI": BASEURI + "/foo", "Type": "container", "TypeEx": PLAYLIST_TYPE, } ) == Ref.directory(uri=BASEURI + "/foo", name="Foo")
def test_track_ref(): assert translator.ref({ 'DisplayName': 'Foo', 'URI': BASEURI + '/foo', 'Type': 'music', }) == Ref.track(uri=BASEURI+'/foo', name='Foo')
def test_container_ref(): assert translator.ref({ 'DisplayName': 'Foo', 'URI': BASEURI + '/foo', 'Type': 'container' }) == Ref.directory(uri=BASEURI+'/foo', name='Foo')
def test_music_ref(): assert translator.ref({ 'DisplayName': 'Foo', 'URI': BASEURI + '/foo', 'Type': 'music', }) == Ref.track(uri=BASEURI+'/foo', name='Foo')
def test_video_ref(): with pytest.raises(ValueError): translator.ref( {"DisplayName": "Foo", "URI": BASEURI + "/foo", "Type": "video"} )
def test_container_ref(): assert translator.ref( {"DisplayName": "Foo", "URI": BASEURI + "/foo", "Type": "container"} ) == Ref.directory(uri=BASEURI + "/foo", name="Foo")
def test_music_ref(): assert translator.ref( {"DisplayName": "Foo", "URI": BASEURI + "/foo", "Type": "music"} ) == Ref.track(uri=BASEURI + "/foo", name="Foo")
def test_directory_ref(): assert translator.ref({ 'DisplayName': 'Foo', 'URI': BASEURI + '/foo', 'Type': 'container' }) == Ref.directory(uri=BASEURI+'/foo', name='Foo')