Skip to content

Commit

Permalink
fix(tests): datadictionary;
Browse files Browse the repository at this point in the history
- < 2.10 data dict fields.
  • Loading branch information
JVickery-TBS committed Dec 9, 2024
1 parent bf7efc6 commit 4a35fc8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ckanext/xloader/tests/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1567,7 +1567,12 @@ def test_load_with_no_strip_white(self, Session):
)
fields = [f for f in rec["fields"] if not f["id"].startswith("_")]
for field in fields:
field["info"] = {"strip_extra_white": False} # <=2.10
if "info" not in field:
field["info"] = {}
if '__extras' not in field["info"]:
field["info"]["__extras"] = {}
field["info"]["strip_extra_white"] = False # <=2.10
field["info"]["__extras"]["strip_extra_white"] = False # <=2.10
field["strip_extra_white"] = False # >=2.11
p.toolkit.get_action("datastore_create")(
{"ignore_auth": True},
Expand Down

0 comments on commit 4a35fc8

Please sign in to comment.