Commit f08597ae authored by Christophe Benz's avatar Christophe Benz
Browse files

Rename "wrong" to "invalid"

parent aa386ba8
......@@ -54,7 +54,7 @@ one;two"""
report = validate_csv_str(source=source, schema=schema1, inspector=inspector, pre_checks_conf=pre_checks_conf)
assert report['tables'][0]['error-count'] == 1
assert len(report['tables'][0]['errors']) == 1
assert report['tables'][0]['errors'][0]['code'] == 'wrong-column-delimiter'
assert report['tables'][0]['errors'][0]['code'] == 'invalid-column-delimiter'
assert report['tables'][0]['errors'][0]['message-data']['detected'] == ';'
assert report['tables'][0]['errors'][0]['message-data']['expected'] == ','
......@@ -66,6 +66,6 @@ one%two"""
report = validate_csv_str(source=source, schema=schema1, inspector=inspector, pre_checks_conf=pre_checks_conf)
assert report['tables'][0]['error-count'] == 1
assert len(report['tables'][0]['errors']) == 1
assert report['tables'][0]['errors'][0]['code'] == 'wrong-column-delimiter'
assert report['tables'][0]['errors'][0]['code'] == 'invalid-column-delimiter'
assert report['tables'][0]['errors'][0]['message-data']['detected'] == '%'
assert report['tables'][0]['errors'][0]['message-data']['expected'] == ','
......@@ -52,7 +52,7 @@ class ColumnDelimiter(PreCheck):
if delimiter == self.detected_delimiter:
return None
return goodtables.Error(
code='wrong-column-delimiter',
code='invalid-column-delimiter',
message_substitutions={
"detected": self.detected_delimiter,
"expected": delimiter,
......
{
"version": "0.0.1",
"errors": {
"wrong-column-delimiter": {
"invalid-column-delimiter": {
"name": "Wrong column delimiter",
"type": "source",
"context": "table",
......
......@@ -53,7 +53,7 @@ def main():
for custom_check_conf in custom_checks_conf:
checks.append({custom_check_conf['name']: custom_check_conf['params']})
inspector = Inspector(checks=checks, row_limit=VALIDATA_MAX_ROWS)
inspector = Inspector(checks=checks, row_limit=VALIDATA_MAX_ROWS, order_fields=True)
report = validate(
source=args.source,
......
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