diff --git a/tests/testutil.py b/tests/testutil.py index 187b53e..264cbd5 100644 --- a/tests/testutil.py +++ b/tests/testutil.py @@ -33,8 +33,10 @@ def check_post_meta(txn, *expected_meta, default=None): if not expected: assert not post.meta else: - assert all(post.meta.get(key, default) == value - for key, value in expected.items()) + actual = None if post.meta is None else { + key: post.meta.get(key, default) for key in expected + } + assert actual == expected def parse_date(s, fmt='%Y-%m-%d'): return datetime.datetime.strptime(s, fmt).date()