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)
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)