From 4a35fc89a134b0e3815dfdd7cfaf08c3a7d80d99 Mon Sep 17 00:00:00 2001 From: Jesse Vickery Date: Mon, 9 Dec 2024 19:47:13 +0000 Subject: [PATCH] fix(tests): datadictionary; - < 2.10 data dict fields. --- ckanext/xloader/tests/test_loader.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ckanext/xloader/tests/test_loader.py b/ckanext/xloader/tests/test_loader.py index 04537c5c..4ceaec13 100644 --- a/ckanext/xloader/tests/test_loader.py +++ b/ckanext/xloader/tests/test_loader.py @@ -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},