Пример #1
0
def test_unique_identifier_multiple(response):
    response.services.append(HS)
    response.services.append(DEVICE)
    response.services.append(MRP)
    response.services.append(AIRPLAY)

    identifiers = list(get_unique_identifiers(response))
    assert len(identifiers) == 4
    assert "hs_id" in identifiers
    assert "dev_id" in identifiers
    assert "mrp_id" in identifiers
    assert "airplay_id" in identifiers
Пример #2
0
def test_unique_identifier_raop(response):
    response.services.append(RAOP)

    identifiers = list(get_unique_identifiers(response))
    assert len(identifiers) == 1
    assert "raop_id" in identifiers
Пример #3
0
def test_unique_identifier_airplay(response):
    response.services.append(AIRPLAY)

    identifiers = list(get_unique_identifiers(response))
    assert len(identifiers) == 1
    assert "airplay_id" in identifiers
Пример #4
0
def test_unique_identifier_mrp(response):
    response.services.append(MRP)

    identifiers = list(get_unique_identifiers(response))
    assert len(identifiers) == 1
    assert "mrp_id" in identifiers
Пример #5
0
def test_unique_identifier_device(response):
    response.services.append(DEVICE)

    identifiers = list(get_unique_identifiers(response))
    assert len(identifiers) == 1
    assert "dev_id" in identifiers
Пример #6
0
def test_unique_identifier_home_sharing(response):
    response.services.append(HS)

    identifiers = list(get_unique_identifiers(response))
    assert len(identifiers) == 1
    assert "hs_id" in identifiers
Пример #7
0
def test_unique_identifier_empty(response):
    assert len(list(get_unique_identifiers(response))) == 0