def test_video_ref():
    with pytest.raises(ValueError):
        translator.ref({
            'DisplayName': 'Foo',
            'URI': BASEURI + '/foo',
            'Type': 'video'
        })
示例#2
0
def test_video_ref():
    with pytest.raises(ValueError):
        translator.ref({
            'DisplayName': 'Foo',
            'URI': BASEURI + '/foo',
            'Type': 'video'
        })
示例#3
0
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')
示例#5
0
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')
示例#6
0
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')
示例#8
0
def test_album_ref():
    assert translator.ref({
        'DisplayName': 'Foo',
        'URI': BASEURI + '/foo',
        'Type': 'container',
        'TypeEx': ALBUM_TYPE
    }) == Ref.album(uri=BASEURI+'/foo', name='Foo')
示例#9
0
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")
示例#10
0
def test_artist_ref():
    assert translator.ref(
        {
            "DisplayName": "Foo",
            "URI": BASEURI + "/foo",
            "Type": "container",
            "TypeEx": ARTIST_TYPE,
        }
    ) == Ref.artist(uri=BASEURI + "/foo", name="Foo")
示例#11
0
def test_album_ref():
    assert translator.ref(
        {
            "DisplayName": "Foo",
            "URI": BASEURI + "/foo",
            "Type": "container",
            "TypeEx": ALBUM_TYPE,
        }
    ) == Ref.album(uri=BASEURI + "/foo", name="Foo")
示例#12
0
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')
示例#14
0
def test_container_ref():
    assert translator.ref({
        'DisplayName': 'Foo',
        'URI': BASEURI + '/foo',
        'Type': 'container'
    }) == Ref.directory(uri=BASEURI+'/foo', name='Foo')
示例#15
0
def test_music_ref():
    assert translator.ref({
        'DisplayName': 'Foo',
        'URI': BASEURI + '/foo',
        'Type': 'music',
    }) == Ref.track(uri=BASEURI+'/foo', name='Foo')
示例#16
0
def test_video_ref():
    with pytest.raises(ValueError):
        translator.ref(
            {"DisplayName": "Foo", "URI": BASEURI + "/foo", "Type": "video"}
        )
示例#17
0
def test_container_ref():
    assert translator.ref(
        {"DisplayName": "Foo", "URI": BASEURI + "/foo", "Type": "container"}
    ) == Ref.directory(uri=BASEURI + "/foo", name="Foo")
示例#18
0
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')