'L{endpoints.serverFromString} looks up plugins of type
L{IStreamServerEndpoint} and constructs endpoints from them.'

def test_typeFromPlugin(self):

    addFakePlugin(self)
    notAReactor = object()
    fakeEndpoint = endpoints.serverFromString(notAReactor, 'fake:hello:world:yes=no:up=down')
    from twisted.plugins.fakeendpoint import fake
    self.assertIs(fakeEndpoint.parser, fake)
    self.assertEqual(fakeEndpoint.args, (notAReactor, 'hello', 'world'))
    self.assertEqual(fakeEndpoint.kwargs, dict(yes='no', up='down'))
