def test_query_ara_footer_with_berhubungan_is_not_none(self): view = View(default_template) rendered = view.render(SampleObjectIdAr) expected = ( "###\n" "#Arti dari coba\n" "###\n\n" "coba\n" "\nIni footer" "\n\n" "###\n" "#Arti berhubungan dari coba\n" "###\n" "a : b\n" "c : d" ) self.assertEqual(rendered, expected)
def test_only_instruction_is_not_none(self): view = View(default_template) rendered = view.render(SampleObject, "Angka") self.assertEqual(rendered, "###\n#Instruksi Layanan Angka\n###" "\n\nIni adalah instruksi")
def test_query_ara_footer_is_not_none(self): view = View(default_template) rendered = view.render(SampleObjectUtama) expected = "###\n" "#Arti dari coba\n" "###\n\n" "coba\n" "\nIni footer" self.assertEqual(rendered, expected)
def test_empty_object(self): view = View(default_template) rendered = view.render() self.assertEqual(rendered, "No object found.")