def assert_identify(message, expected_true=[]):
true = set()<EOL>false = set()<EOL>expected_false = set()<EOL>expected_true = set(expected_true)<EOL>for method_name in dir(message):<EOL><INDENT>if method_name.startswith("<STR_LIT>"):<EOL><INDENT>test_method = getattr(message, method_name)<EOL>result = test_method()<EOL>if method_name not in expected_true:<EOL><INDENT>expected_false.add(method_name)<EOL><DEDENT>if result is True:<EOL><INDENT>true.add(method_name)<EOL><DEDENT>if result is False:<EOL><INDENT>false.add(method_name)<EOL><DEDENT><DEDENT><DEDENT>assert false == expected_false, "<STR_LIT>"<EOL>assert true == expected_true, "<STR_LIT>"<EOL>
Make sure the messages "is_*" are True or False.