diff --git a/tests/__init__.py b/tests/__init__.py index ef37da5..8effcb0 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -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):