mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-29 09:35:50 +00:00
Make assertions a bit narrower again...
and use ownCloud/SabreDAV normalized form for item template instead
This commit is contained in:
parent
3bff81303c
commit
ff688ca2b9
2 changed files with 6 additions and 3 deletions
|
|
@ -1,9 +1,12 @@
|
|||
def normalize_item(item):
|
||||
# - X-RADICALE-NAME is used by radicale, because hrefs don't really exist
|
||||
# in their filesystem backend
|
||||
# - PRODID is changed by radicale for some reason after upload, but nobody
|
||||
# cares about that anyway
|
||||
rv = set()
|
||||
for line in item.raw.splitlines():
|
||||
line = line.strip()
|
||||
line = line.strip().split(u':', 1)
|
||||
line[0] = line[0].split(';')[0]
|
||||
if line[0] in ('X-RADICALE-NAME', 'PRODID', 'REV'):
|
||||
continue
|
||||
rv.add(u':'.join(line))
|
||||
|
|
|
|||
|
|
@ -21,11 +21,11 @@ class TestCarddavStorage(DavStorageTests):
|
|||
u'N:Daboo;Cyrus\n'
|
||||
u'ADR;TYPE=POSTAL:;2822 Email HQ;' # address continuing
|
||||
u'Suite 2821;RFCVille;PA;15213;USA\n' # on next line
|
||||
u'EMAIL;TYPE=INTERNET,PREF:cyrus@example.com\n'
|
||||
u'EMAIL;TYPE=INTERNET;TYPE=PREF:cyrus@example.com\n'
|
||||
u'NICKNAME:me\n'
|
||||
u'NOTE:Example VCard.\n'
|
||||
u'ORG:Self Employed\n'
|
||||
u'TEL;TYPE=WORK,VOICE:412 605 0499\n'
|
||||
u'TEL;TYPE=WORK;TYPE=VOICE:412 605 0499\n'
|
||||
u'TEL;TYPE=FAX:412 605 0705\n'
|
||||
u'URL:http://www.example.com\n'
|
||||
u'UID:{uid}\n'
|
||||
|
|
|
|||
Loading…
Reference in a new issue