Exemplo n.º 1
0
    def test_invalid_config(self):
        """Test configuration with defaults."""
        config = {"statsd": {"host1": "host1"}}

        with pytest.raises(vol.Invalid):
            statsd.CONFIG_SCHEMA(None)
        with pytest.raises(vol.Invalid):
            statsd.CONFIG_SCHEMA(config)
Exemplo n.º 2
0
    def test_invalid_config(self):
        """Test configuration with defaults."""
        config = {
            'statsd': {
                'host1': 'host1',
            }
        }

        with self.assertRaises(vol.Invalid):
            statsd.CONFIG_SCHEMA(None)
        with self.assertRaises(vol.Invalid):
            statsd.CONFIG_SCHEMA(config)