Example #1
0
    def test_validate_serve_http(self):
        # Test
        config = PluginCallConfiguration({constants.CONFIG_SERVE_HTTP : 'true'}, {})
        result, msg = configuration._validate_http(config)

        # Verify
        self.assertTrue(result)
        self.assertTrue(msg is None)
Example #2
0
    def test_validate_serve_http_invalid(self):
        # Test
        config = PluginCallConfiguration({constants.CONFIG_SERVE_HTTP : 'foo'}, {})
        result, msg = configuration._validate_http(config)

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