'When passed a TCP strports description, L{endpoints.clientFromString}
returns a L{TCP4ClientEndpoint} instance initialized with the values
from the string.'

def test_tcp(self):

    reactor = object()
    client = endpoints.clientFromString(reactor, 'tcp:host=example.com:port=1234:timeout=7:bindAddress=10.0.0.2')
    self.assertIsInstance(client, endpoints.TCP4ClientEndpoint)
    self.assertIs(client._reactor, reactor)
    self.assertEqual(client._host, 'example.com')
    self.assertEqual(client._port, 1234)
    self.assertEqual(client._timeout, 7)
    self.assertEqual(client._bindAddress, ('10.0.0.2', 0))
