コード例 #1
0
 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())
コード例 #2
0
ファイル: test_manage.py プロジェクト: bac/juju-gui-charm
 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())
コード例 #3
0
ファイル: test_manage.py プロジェクト: juju/juju-gui-charm
 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())
コード例 #4
0
 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())
コード例 #5
0
 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())