Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
 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")
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
 def test_empty_object(self):
     view = View(default_template)
     rendered = view.render()
     self.assertEqual(rendered, "No object found.")