mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Loosen up assertions even more
This commit is contained in:
parent
d6b3c6d328
commit
3bff81303c
1 changed files with 10 additions and 4 deletions
|
|
@ -1,7 +1,13 @@
|
|||
def normalize_item(x):
|
||||
return set(x for x in x.raw.splitlines() if
|
||||
not x.startswith('X-RADICALE-NAME') and
|
||||
not x.startswith('PRODID'))
|
||||
def normalize_item(item):
|
||||
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))
|
||||
return rv
|
||||
|
||||
|
||||
def assert_item_equals(a, b):
|
||||
|
|
|
|||
Loading…
Reference in a new issue