Example #1
0
 def test_get_router_with_wrong_key(self):
     router = QaamusRouter()
     router.register("coba", coba)
     result = router.get_controller("bb", "a")
     self.assertEqual(result, "Layanan tidak ditemukan.")
Example #2
0
 def test_get_router_with_arg(self):
     router = QaamusRouter()
     router.register("coba_arg", coba_arg)
     result = router.get_controller("coba_arg", "aku")
     self.assertEqual(result, "aku")
Example #3
0
 def test_add_new_router(self):
     router = QaamusRouter()
     router.register("coba", coba)
     self.assertEqual(router.routers['coba'](), "aku")