class PegonTestCase(unittest.TestCase): def setUp(self): self.soup = soupping(get_abs_path("html/pegon_suratman")) self.pegon = PegonParser(self.soup) def tearDown(self): del self.pegon del self.soup def test_get_query(self): result = self.pegon._get_query() expected = "suratman" self.assertEqual(result, expected) def test_get_ara(self): result = self.pegon._get_ara() expected = "سوراتمان" self.assertEqual(result, expected) def test_get_footer(self): result = self.pegon._get_footer() expected = "" self.assertEqual(result, expected) def test_get_instruction_Result_instance(self): result = self.pegon.get_instruction() expected = ("Masukkan nama orang (nama yang bukan dari bahasa arab)," " nama negara, nama kota, nama desa maupun nama lain yang" " ingin di tulis kedalam tulisan arab") self.assertTrue(isinstance(result, Result)) self.assertEqual(result.instruksi, expected)
def setUp(self): self.soup = soupping(get_abs_path("html/pegon_suratman")) self.pegon = PegonParser(self.soup)