def test_timeout(self): """ Test that the Timeout is set """ with patch.object(TSocket.TSocket, "setTimeout") as Pset: c, t = thrifty._clientmaker(Service, "localhost", 666) Pset.assert_called_with(1000) c, t = thrifty._clientmaker(Service, "localhost", 666, timeout=5) Pset.assert_called_with(5000)
def test_framed(self): """ Should be a different Transport class """ c, t = thrifty._clientmaker(Service, 'localhost', 666, framed=True) self.assertIsInstance(t, TTransport.TFramedTransport)
def test_clientmaker(self): """ """ c, t = thrifty._clientmaker(Service, "localhost", 567) self.assertIsInstance(c, Service.Client) self.assertIsInstance(t, TTransport.TBufferedTransport)