From 3bff81303ccf7f7fee40f13e4e748f2aa1933787 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Wed, 19 Mar 2014 15:55:08 +0100 Subject: [PATCH] Loosen up assertions even more --- tests/__init__.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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):