def handle(): # first is_free data = unserialize(self.socket_rr.recv()) self.assertEquals(['is_free',None,True],data) self.socket_rr.send(serialize([[{},{}], {}])) # second is free data = unserialize(self.socket_rr.recv()) self.assertEquals(['is_free',None,False],data) self.socket_rr.send('{}') # result data = unserialize(self.socket_rr.recv()) self.assertEquals(['solve',None,{}],data) self.socket_rr.send('{}')
def handle(): self.socket_rr.recv() self.assertTrue(self.supervisor.isFree()) self.socket_rr.send('["invalid"]') data = unserialize(self.socket_rr.recv()) self.assertIsNotNone(data[1])
def handle(): self.socket_rr.recv() scenario_data = [self.generateScenario(), {}] self.socket_rr.send(serialize(scenario_data)) data = unserialize(self.socket_rr.recv()) self.assertIsNone(data[1])