Exemple #1
0
def test_service_merge_properties(props1, props2, expected):
    service1 = ManualService("id1", Protocol.DMAP, 0, props1)
    service2 = ManualService("id2", Protocol.DMAP, 0, props2)

    service1.merge(service2)

    assert not DeepDiff(service1.properties, expected)
Exemple #2
0
def test_service_merge_credentials(creds1, creds2, expected):
    service1 = ManualService("id1", Protocol.DMAP, 0, {})
    service2 = ManualService("id2", Protocol.DMAP, 0, {})

    service1.credentials = creds1
    service2.credentials = creds2

    service1.merge(service2)

    assert service1.credentials == expected
Exemple #3
0
def test_service_merge_password(password1, password2, expected):
    service1 = ManualService("id1", Protocol.DMAP, 0, {})
    service2 = ManualService("id2", Protocol.DMAP, 0, {})

    service1.password = password1
    service2.password = password2

    service1.merge(service2)

    assert service1.password == expected