mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-29 09:35:50 +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:
|
||||
if line.startswith(u'UID:'):
|
||||
self.uid = line[4:].strip()
|
||||
self.raw = '\n'.join(raw)
|
||||
self.raw = u'\n'.join(raw)
|
||||
|
||||
|
||||
class Storage(object):
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ class StorageTests(object):
|
|||
|
||||
def test_generic(self):
|
||||
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()
|
||||
for item in items:
|
||||
s.upload(item)
|
||||
|
|
|
|||
|
|
@ -25,15 +25,15 @@ class CaldavStorageTests(TestCase, DavStorageTests):
|
|||
storage_class = CaldavStorage
|
||||
|
||||
def _create_bogus_item(self, uid):
|
||||
return Item(u'BEGIN:VCALENDAR'
|
||||
u'VERSION:2.0'
|
||||
u'PRODID:-//dmfs.org//mimedir.icalendar//EN'
|
||||
u'BEGIN:VTODO'
|
||||
u'CREATED:20130721T142233Z'
|
||||
u'DTSTAMP:20130730T074543Z'
|
||||
u'LAST-MODIFIED;VALUE=DATE-TIME:20140122T151338Z'
|
||||
u'SEQUENCE:2'
|
||||
u'SUMMARY:Book: Kowlani - Tödlicher Staub'
|
||||
u'UID:{}'
|
||||
u'END:VTODO'
|
||||
return Item(u'BEGIN:VCALENDAR\n'
|
||||
u'VERSION:2.0\n'
|
||||
u'PRODID:-//dmfs.org//mimedir.icalendar//EN\n'
|
||||
u'BEGIN:VTODO\n'
|
||||
u'CREATED:20130721T142233Z\n'
|
||||
u'DTSTAMP:20130730T074543Z\n'
|
||||
u'LAST-MODIFIED;VALUE=DATE-TIME:20140122T151338Z\n'
|
||||
u'SEQUENCE:2\n'
|
||||
u'SUMMARY:Book: Kowlani - Tödlicher Staub\n'
|
||||
u'UID:{}\n'
|
||||
u'END:VTODO\n'
|
||||
u'END:VCALENDAR'.format(uid))
|
||||
|
|
|
|||
Loading…
Reference in a new issue