mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Better handling of stub items
This commit is contained in:
parent
82dd045e4b
commit
9d679999ef
2 changed files with 16 additions and 13 deletions
|
|
@ -15,19 +15,7 @@ import vdirsyncer.exceptions as exceptions
|
|||
class StorageTests(object):
|
||||
|
||||
def _create_bogus_item(self, uid):
|
||||
return Item(u'''BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
PRODID:-//dmfs.org//mimedir.icalendar//EN
|
||||
BEGIN:VTODO
|
||||
CREATED:20130721T142233Z
|
||||
DTSTAMP:20130730T074543Z
|
||||
LAST-MODIFIED;VALUE=DATE-TIME:20140122T151338Z
|
||||
SEQUENCE:2
|
||||
SUMMARY:Book: Kowlani - Tödlicher Staub
|
||||
UID:{}
|
||||
END:VTODO
|
||||
END:VCALENDAR
|
||||
'''.format(uid))
|
||||
return Item(u'UID:{}'.format(uid))
|
||||
|
||||
def _get_storage(self, **kwargs):
|
||||
raise NotImplementedError()
|
||||
|
|
|
|||
|
|
@ -16,9 +16,24 @@ __version__ = '0.1.0'
|
|||
|
||||
from unittest import TestCase
|
||||
|
||||
from vdirsyncer.storage.base import Item
|
||||
from vdirsyncer.storage.dav.caldav import CaldavStorage
|
||||
from . import DavStorageTests
|
||||
|
||||
|
||||
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'
|
||||
u'END:VCALENDAR'.format(uid))
|
||||
|
|
|
|||
Loading…
Reference in a new issue