Ejemplo n.º 1
0
 def test_remote_ping(self):
     s = StateDouble()
     r = ServerDouble()
     c = PingHandler(s, r)
     c.handle((1, None), ["AD", "test2.example.com"])
     self.assertEquals([("AD", "test2.example.com")], s.insight)
     self.assertFalse(r.pung)
Ejemplo n.º 2
0
 def test_remote_ping_local_dest(self):
     s = StateDouble()
     r = ServerDouble()
     c = PingHandler(s, r)
     c.handle((1, None), ["AD", "test.example.com"])
     self.assertEquals([], s.insight)
     self.assertTrue(r.pung)
Ejemplo n.º 3
0
 def test_local_ping(self):
     s = StateDouble()
     r = ServerDouble()
     c = PingHandler(s, r)
     c.handle((1, None), ["AC"])
     self.assertEquals([], s.insight)
     self.assertTrue(r.pung)