diff --git a/tests/unit/test_sync.py b/tests/unit/test_sync.py index 4dcec3b..97538e3 100644 --- a/tests/unit/test_sync.py +++ b/tests/unit/test_sync.py @@ -660,3 +660,15 @@ def test_rollback(error_callback): else: with pytest.raises(ActionIntentionallyFailed): sync(a, b, status=status, conflict_resolution='a wins') + + +def test_duplicate_hrefs(): + a = MemoryStorage() + b = MemoryStorage() + a.list = lambda: [('a', 'a')] * 3 + a.items['a'] = ('a', Item('UID:a')) + + status = {} + sync(a, b, status) + with pytest.raises(AssertionError): + sync(a, b, status)