Пример #1
0
def test_remote_added():
    local = make_profiles()
    remote = make_profiles(("foo", [("WITH_FOO", "ON")]), )
    new, updated = compute_profile_updates(local, remote)
    assert not updated
    assert len(new) == 1
    assert new[0] == remote["foo"]
def test_remote_added():
    local = make_profiles()
    remote = make_profiles(
        ("foo", [("WITH_FOO", "ON")]),
    )
    new, updated = compute_profile_updates(local, remote)
    assert not updated
    assert len(new) == 1
    assert new[0] == remote["foo"]
Пример #3
0
def test_same_remote():
    local = make_profiles(
        ("eggs", [("WITH_EGGS"), "ON"]),
        ("foo", [("WITH_FOO", "ON")]),
    )
    remote = make_profiles(
        ("eggs", [("WITH_EGGS"), "ON"]),
        ("foo", [("WITH_FOO", "ON")]),
    )
    new, updated = compute_profile_updates(local, remote)
    assert not new
    assert not updated
def test_same_remote():
    local = make_profiles(
        ("eggs", [("WITH_EGGS"), "ON"]),
        ("foo", [("WITH_FOO", "ON")]),
    )
    remote = make_profiles(
        ("eggs", [("WITH_EGGS"), "ON"]),
        ("foo", [("WITH_FOO", "ON")]),
    )
    new, updated = compute_profile_updates(local, remote)
    assert not new
    assert not updated
Пример #5
0
def test_remote_updated():
    local = make_profiles(
        ("eggs", [("WITH_EGGS"), "ON"]),
        ("foo", [("WITH_FOO", "ON"), ("WITH_BAR", "OFF")]),
    )
    remote = make_profiles(
        ("eggs", [("WITH_EGGS"), "ON"]),
        ("foo", [("WITH_FOO", "ON")]),
    )
    new, updated = compute_profile_updates(local, remote)
    assert not new
    assert len(updated) == 1
    assert updated[0] == remote["foo"]
def test_remote_updated():
    local = make_profiles(
        ("eggs", [("WITH_EGGS"), "ON"]),
        ("foo", [("WITH_FOO", "ON"), ("WITH_BAR", "OFF")]),
    )
    remote = make_profiles(
        ("eggs", [("WITH_EGGS"), "ON"]),
        ("foo", [("WITH_FOO", "ON")]),
    )
    new, updated = compute_profile_updates(local, remote)
    assert not new
    assert len(updated) == 1
    assert updated[0] == remote["foo"]