def test_options(self): # The SSL options are correctly returned. mock_options = mock.Mock(sslpath='/my/path') expected = { 'certfile': '/my/path/juju.crt', 'keyfile': '/my/path/juju.key', } with mock.patch('guiserver.manage.options', mock_options): self.assertEqual(expected, manage._get_ssl_options())
def test_options(self): # The SSL options are correctly returned. expected = { 'certfile': '/my/path/juju.crt', 'keyfile': '/my/path/juju.key', 'ssl_version': ssl.PROTOCOL_SSLv23, 'ciphers': manage.CIPHERS, } with mock.patch('guiserver.manage.options', self.mock_options): self.assertEqual(expected, manage._get_ssl_options())
def test_options(self): # The SSL options are correctly returned. mock_options = mock.Mock(sslpath="/my/path") expected = {"certfile": "/my/path/juju.crt", "keyfile": "/my/path/juju.key"} with mock.patch("guiserver.manage.options", mock_options): self.assertEqual(expected, manage._get_ssl_options())