'L{Factory.buildProtocol} by default constructs a protocol by calling
its C{protocol} attribute, and attaches the factory to the result.'

def test_defaultBuildProtocol(self):

    class SomeProtocol(Protocol, ):
        pass
    f = Factory()
    f.protocol = SomeProtocol
    protocol = f.buildProtocol(None)
    self.assertIsInstance(protocol, SomeProtocol)
    self.assertIs(protocol.factory, f)
