def should_match(doc, charset): match = META_CHARSET_TAG.search(doc) assert_true(match) assert_equals(match.group('charset'), charset)
def shouldnt_match(doc): match = META_CHARSET_TAG.search(doc) assert_false(match)