Add test re #657

This commit is contained in:
Markus Unterwaditzer 2017-08-12 16:46:22 +02:00
parent e305869fac
commit 0d47e06d89

View file

@ -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)