def checkword(dictionary, kanji, kana): """ dictionary (Dictionary): the dictionary we want to check in kanji (unicode): the kanji we want to check kana (unicode): the kana we want to check """ html = manage_words.get_html_for_word(dictionary, kana, kanji) json_object = manage_words.get_json_for_word(dictionary, kana, kanji) html_parse_result = dictionary.lookup(kanji, kana, html) json_result = Result.from_jsonable(dictionary, json_object) if (json_result != html_parse_result): print_differences_result(json_result, html_parse_result, "JSON result", "HTML result") assert(json_result == html_parse_result)