ckan / ckanext-validation

CKAN extension for validating Data Packages using Table Schema.
MIT License
30 stars 33 forks source link

Site-wide validation overrides #89

Open wardi opened 1 year ago

wardi commented 1 year ago

We use this to implement a "UTF-8-only" policy, but the same could be used for standardizing other options across a site with a configuration option.

wardi commented 1 year ago

failure is unrelated to this change.

The problem is our tests are creating a resource with ckan's factory, which creates a dataset, then passes the resource to a new dataset factory, but that resource already belongs to a dataset.

ThrawnCA commented 1 year ago

It may be unrelated, but it still means this change isn't properly tested.

How easily can the tests be fixed?

wardi commented 1 year ago

test resources should be created like this https://github.com/frictionlessdata/ckanext-validation/blob/1073c80dace453a404df3d5f1ac1ae86a88b5029/ckanext/validation/tests/test_logic.py#L235-L237 instead of like https://github.com/frictionlessdata/ckanext-validation/blob/1073c80dace453a404df3d5f1ac1ae86a88b5029/ckanext/validation/tests/test_logic.py#L349-L351