'L{endpoints.clientFromString} looks up plugins of type
L{IStreamClientEndpoint} and constructs endpoints from them.'

def test_typeFromPlugin(self):

    addFakePlugin(self)
    notAReactor = object()
    clientEndpoint = endpoints.clientFromString(notAReactor, 'crfake:alpha:beta:cee=dee:num=1')
    from twisted.plugins.fakeendpoint import fakeClientWithReactor
    self.assertIs(clientEndpoint.parser, fakeClientWithReactor)
    self.assertEqual(clientEndpoint.args, (notAReactor, 'alpha', 'beta'))
    self.assertEqual(clientEndpoint.kwargs, dict(cee='dee', num='1'))
