Commit 7cdf72ad authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Add tests

parent a03623a8
...@@ -84,6 +84,14 @@ a;b;c""" ...@@ -84,6 +84,14 @@ a;b;c"""
assert report.valid assert report.valid
def test_empty_required_value(schema_abc):
source = [["A", "B", "C"], ["", "b", "c"]]
report = validate(source, schema_abc)
assert not report.valid
assert len(report["tasks"][0]["errors"]) == 1
assert report["tasks"][0]["errors"][0]["code"] == "constraint-error"
def test_missing_required_column(schema_abc): def test_missing_required_column(schema_abc):
source = [["B", "C"], ["b", "c"]] source = [["B", "C"], ["b", "c"]]
report = validate(source, schema_abc) report = validate(source, schema_abc)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment