def test_result(self):
        c, s, pump = connectedServerAndClient()
        for x, y in (c, s), (s, c):
            # test reflexivity
            foo = SimpleRemote()
            x.setNameForLocal("foo", foo)
            bar = y.remoteForName("foo")
            self.expectedThunkResult = 8
            bar.callRemote('thunk',1 - self.expectedThunkResult
                ).addCallbacks(self.thunkResultGood, self.thunkErrorBad)
            # Send question.
            pump.pump()
            # Send response.
            pump.pump()
            # Shouldn't require any more pumping than that...
            self.assertEquals(self.thunkResult, self.expectedThunkResult,
                              "result wasn't received.")
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/test/test_pb.py/BrokerTestCase.test_result/swapped operands of `-`