示例#1
0
文件: pong.py 项目: WorldIRC/WISH
 def test_remote_pong(self):
     s = StateDouble()
     r = ServerDouble()
     c = PongHandler(s, r)
     c.handle((1,None), ["AD", "AC"])
     self.assertEquals([((3, None), (2, None))], s.insight)
     self.assertFalse(r.pung)
示例#2
0
文件: pong.py 项目: WorldIRC/WISH
 def test_local_pong(self):
     s = StateDouble()
     r = ServerDouble()
     c = PongHandler(s, r)
     c.handle((1,None), ["AD", "AB"])
     self.assertEquals([], s.insight)
     self.assertTrue(r.pung)