'L{BrowserLikePolicyForHTTPS.creatorForNetloc} returns an
L{IOpenSSLClientConnectionCreator} provider which will add certificates
from the given trust root.'

def test_alternateTrustRoot(self):

    @implementer(IOpenSSLTrustRoot)
    class CustomOpenSSLTrustRoot(object, ):
        called = False
        context = None
        def _addCACertsToContext(self, context):
            self.called = True
            self.context = context
    trustRoot = CustomOpenSSLTrustRoot()
    policy = BrowserLikePolicyForHTTPS(trustRoot=trustRoot)
    creator = policy.creatorForNetloc('thingy', 4321)
    self.assertTrue(trustRoot.called)
    connection = creator.clientConnectionForTLS(None)
    self.assertIs(trustRoot.context, connection.get_context())
