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"]
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_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"]