mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Fix a typo
This commit is contained in:
parent
9d679999ef
commit
5eb4cbb429
3 changed files with 14 additions and 12 deletions
|
|
@ -20,7 +20,7 @@ class Item(object):
|
||||||
for line in raw:
|
for line in raw:
|
||||||
if line.startswith(u'UID:'):
|
if line.startswith(u'UID:'):
|
||||||
self.uid = line[4:].strip()
|
self.uid = line[4:].strip()
|
||||||
self.raw = '\n'.join(raw)
|
self.raw = u'\n'.join(raw)
|
||||||
|
|
||||||
|
|
||||||
class Storage(object):
|
class Storage(object):
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,8 @@ class StorageTests(object):
|
||||||
|
|
||||||
def test_generic(self):
|
def test_generic(self):
|
||||||
items = map(self._create_bogus_item, range(1, 10))
|
items = map(self._create_bogus_item, range(1, 10))
|
||||||
|
for i, item in enumerate(items):
|
||||||
|
assert item.uid == unicode(i + 1), item.raw
|
||||||
s = self._get_storage()
|
s = self._get_storage()
|
||||||
for item in items:
|
for item in items:
|
||||||
s.upload(item)
|
s.upload(item)
|
||||||
|
|
|
||||||
|
|
@ -25,15 +25,15 @@ class CaldavStorageTests(TestCase, DavStorageTests):
|
||||||
storage_class = CaldavStorage
|
storage_class = CaldavStorage
|
||||||
|
|
||||||
def _create_bogus_item(self, uid):
|
def _create_bogus_item(self, uid):
|
||||||
return Item(u'BEGIN:VCALENDAR'
|
return Item(u'BEGIN:VCALENDAR\n'
|
||||||
u'VERSION:2.0'
|
u'VERSION:2.0\n'
|
||||||
u'PRODID:-//dmfs.org//mimedir.icalendar//EN'
|
u'PRODID:-//dmfs.org//mimedir.icalendar//EN\n'
|
||||||
u'BEGIN:VTODO'
|
u'BEGIN:VTODO\n'
|
||||||
u'CREATED:20130721T142233Z'
|
u'CREATED:20130721T142233Z\n'
|
||||||
u'DTSTAMP:20130730T074543Z'
|
u'DTSTAMP:20130730T074543Z\n'
|
||||||
u'LAST-MODIFIED;VALUE=DATE-TIME:20140122T151338Z'
|
u'LAST-MODIFIED;VALUE=DATE-TIME:20140122T151338Z\n'
|
||||||
u'SEQUENCE:2'
|
u'SEQUENCE:2\n'
|
||||||
u'SUMMARY:Book: Kowlani - Tödlicher Staub'
|
u'SUMMARY:Book: Kowlani - Tödlicher Staub\n'
|
||||||
u'UID:{}'
|
u'UID:{}\n'
|
||||||
u'END:VTODO'
|
u'END:VTODO\n'
|
||||||
u'END:VCALENDAR'.format(uid))
|
u'END:VCALENDAR'.format(uid))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue