mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
The original testcase already takes care of this.
This commit is contained in:
parent
6c0223f048
commit
e21a197006
2 changed files with 0 additions and 28 deletions
|
|
@ -81,17 +81,3 @@ class TestHttpStorage(StorageTests):
|
||||||
return {'url': 'http://localhost:123/collection.txt',
|
return {'url': 'http://localhost:123/collection.txt',
|
||||||
'path': self.tmpfile}
|
'path': self.tmpfile}
|
||||||
return inner
|
return inner
|
||||||
|
|
||||||
def test_update(self, s, get_item):
|
|
||||||
'''The original testcase tries to fetch with the old href. But this
|
|
||||||
storage doesn't have real hrefs, so the href might change if the
|
|
||||||
underlying UID changes. '''
|
|
||||||
|
|
||||||
item = get_item()
|
|
||||||
href, etag = s.upload(item)
|
|
||||||
assert_item_equals(s.get(href)[0], item)
|
|
||||||
|
|
||||||
new_item = get_item()
|
|
||||||
s.update(href, new_item, etag)
|
|
||||||
((new_href, new_etag),) = s.list()
|
|
||||||
assert_item_equals(s.get(new_href)[0], new_item)
|
|
||||||
|
|
|
||||||
|
|
@ -45,17 +45,3 @@ class TestSingleFileStorage(StorageTests):
|
||||||
|
|
||||||
with pytest.raises(IOError):
|
with pytest.raises(IOError):
|
||||||
s = self.storage_class(str(tmpdir) + '/foo.ics', create=False)
|
s = self.storage_class(str(tmpdir) + '/foo.ics', create=False)
|
||||||
|
|
||||||
def test_update(self, s, get_item):
|
|
||||||
'''The original testcase tries to fetch with the old href. But this
|
|
||||||
storage doesn't have real hrefs, so the href might change if the
|
|
||||||
underlying UID changes. '''
|
|
||||||
|
|
||||||
item = get_item()
|
|
||||||
href, etag = s.upload(item)
|
|
||||||
assert_item_equals(s.get(href)[0], item)
|
|
||||||
|
|
||||||
new_item = get_item()
|
|
||||||
s.update(href, new_item, etag)
|
|
||||||
((new_href, new_etag),) = s.list()
|
|
||||||
assert_item_equals(s.get(new_href)[0], new_item)
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue