Exemplo n.º 1
0
 def test_default_gateway(self):
     r = Router("a.gbl.", default_gateway="b.gbl.")
     self.assertEquals("a.gbl.", r.get_route("a.gbl."))
     self.assertEquals("b.gbl.", r.get_route("c.gbl."))
Exemplo n.º 2
0
 def test_route1(self):
     r = Router("a.gbl.", default_gateway="b.gbl.")
     r.add_route("com.", "d.gbl.")
     r.add_route("se.", "d.gbl.")
     self.assertEquals("d.gbl.", r.get_route("test.com."))
     self.assertEquals("d.gbl.", r.get_route("test.se."))