diff --git a/tests/storage/__init__.py b/tests/storage/__init__.py index 4111ad8..180c9b0 100644 --- a/tests/storage/__init__.py +++ b/tests/storage/__init__.py @@ -13,7 +13,7 @@ import pytest from .. import assert_item_equals, SIMPLE_TEMPLATE import vdirsyncer.exceptions as exceptions from vdirsyncer.storage.base import Item -from vdirsyncer.utils import text_type +from vdirsyncer.utils import text_type, iteritems class StorageTests(object): @@ -164,3 +164,17 @@ class StorageTests(object): href, etag = s.upload(self._create_bogus_item()) assert s.has(href) assert not s.has('asd') + + def test_update_others_stay_the_same(self): + s = self._get_storage() + info = dict([ + s.upload(self._create_bogus_item()), + s.upload(self._create_bogus_item()), + s.upload(self._create_bogus_item()), + s.upload(self._create_bogus_item()) + ]) + + assert dict( + (href, etag) for href, item, etag + in s.get_multi(href for href, etag in iteritems(info)) + ) == info