+def check_dcparser(xml_file, result_file):
+ xml = open(xml_file, 'rb').read()
+ result = codecs.open(result_file, encoding='utf-8').read()
+ info = dcparser.BookInfo.from_bytes(xml).to_dict()
+ should_be = eval(result)
+ for key in should_be:
+ assert_equals(info[key], should_be[key])