def test_decompose(self): words = Words(dictionary_url="https://fakurl.com/") words.words = ["bad", "dab", "cab"] words.preprocess_dict() ret = words.decompose("bade") self.assertIn("bad", ret) self.assertIn("dab", ret) self.assertNotIn("cab", ret)
def test_preprocess_dict(self): words = Words(dictionary_url="https://fakurl.com/") words.words = ["bad", "dab"] ret = words.preprocess_dict() self.assertIn("abd", ret) self.assertIn("bad", ret["abd"]) self.assertIn("dab", ret["abd"])