def test_load_invalid(file):
    with open(os.path.join(schemas_directory, file)) as f:
        topology = json.load(f)
        if len(topology["topology"].get("nodes", [])) > 0:

            # Simulate an error
            del topology["topology"]["nodes"][0]["properties"]["name"]

            errors = getTopologyValidationErrors(topology)
            assert errors is not None, errors
Beispiel #2
0
def test_load_invalid(file):
    with open(os.path.join(schemas_directory, file)) as f:
        topology = json.load(f)
        if len(topology["topology"].get("nodes", [])) > 0:

            # Simulate an error
            del topology["topology"]["nodes"][0]["properties"]["name"]

            errors = getTopologyValidationErrors(topology)
            assert errors is not None, errors
def test_load(file):
    with open(os.path.join(schemas_directory, file)) as f:
        topology = json.load(f)
        errors = getTopologyValidationErrors(topology)
        assert errors is None, errors
Beispiel #4
0
def test_load(file):
    with open(os.path.join(schemas_directory, file)) as f:
        topology = json.load(f)
        errors = getTopologyValidationErrors(topology)
        assert errors is None, errors