Ejemplo n.º 1
0
    def test_validate_serve_https(self):
        # Test
        config = PluginCallConfiguration({constants.CONFIG_SERVE_HTTPS : 'true'}, {})
        result, msg = configuration._validate_https(config)

        # Verify
        self.assertTrue(result)
        self.assertTrue(msg is None)
Ejemplo n.º 2
0
    def test_validate_serve_https_invalid(self):
        # Test
        config = PluginCallConfiguration({constants.CONFIG_SERVE_HTTPS : 'foo'}, {})
        result, msg = configuration._validate_https(config)

        # Verify
        self.assertTrue(not result)
        self.assertTrue(msg is not None)
        self.assertTrue(constants.CONFIG_SERVE_HTTPS in msg)