def test_config_required_bad():
    """Pass."""
    schemas = copy.deepcopy(SCHEMAS_DICT)
    for name, schema in schemas.items():
        schema["required"] = True
    with pytest.raises(ConfigRequired):
        config_required(schemas=schemas, new_config={}, source="badwolf")
Beispiel #2
0
def test_config_required_ignored():
    schemas = copy.deepcopy(SCHEMAS_DICT)
    for name, schema in schemas.items():
        schema["required"] = True
    ignores = list(schemas)
    config_required(schemas=schemas,
                    new_config={},
                    source="badwolf",
                    ignores=ignores)
def test_config_required_ok(value):
    """Pass."""
    schemas = copy.deepcopy(SCHEMAS_DICT)
    for name, schema in schemas.items():
        schema["required"] = False
    config_required(schemas=schemas, new_config=value, source="badwolf")