fedora_messaging.twisted.service._configure_tls_parameters

Here are the examples of the python api fedora_messaging.twisted.service._configure_tls_parameters taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

3 Source : test_service.py
with GNU General Public License v2.0
from fedora-infra

    def test_key_and_cert(self):
        """Assert configuring a cert and key results in a TLS connection with new pika versions."""
        params = URLParameters("amqps://myhost")
        tls_conf = {
            "keyfile": os.path.join(FIXTURES_DIR, "key.pem"),
            "certfile": os.path.join(FIXTURES_DIR, "cert.pem"),
            "ca_cert": os.path.join(FIXTURES_DIR, "ca_bundle.pem"),
        }

        with mock.patch.dict(config.conf, {"tls": tls_conf}):
            _configure_tls_parameters(params)

        self.assertTrue(isinstance(params.ssl_options, SSLOptions))

    def test__invalid_key(self):