def test_call_timeout_partial_call(self):
        self.client.connected = mock.Mock()
        self.client.connected.get = mock.Mock(side_effect=lambda ident: True)
        self.client.send_params = mock.Mock()

        method = self.proxy.some_method
        timeout = 1
        method.set_timeout(timeout)

        with mock.patch("snakemq.rpc.get_time") as time_mock:
            time_results = iter([0.0, timeout * 1.1])
            time_mock.side_effect = lambda: next(time_results)
            self.assertRaises(snakemq.rpc.PartialCall, method)
        self.assertEqual(self.client.cond.wait.call_count, 1)
        self.assertEqual(self.client.connected.get.call_count, 2)

        # subsequent reception of result must not be saved
        req_id = self.client.send_params.call_args[0][1]["req_id"]
        self.assertEqual(self.client.waiting_for_result, set())
        result = {"req_id": req_id}
        self.client.store_result(result)
        self.assertEqual(self.client.results, {})

#############################################################################
#############################################################################
Factory function returning FSTransaction objects.
dataset/ETHPy150Open dsiroky/snakemq/tests/unittests/tests_rpc.py/TestRpcClient.test_call_timeout_partial_call--crossover with--dataset/ETHPy150Open cloudmatrix/esky/esky/fstransact/__init__.py/FSTransaction