Skip to content

Commit

Permalink
debug tests...
Browse files Browse the repository at this point in the history
  • Loading branch information
JVickery-TBS committed Dec 9, 2024
1 parent 4886902 commit 6587421
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions ckanext/xloader/tests/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1574,10 +1574,7 @@ def test_load_with_no_strip_white(self, Session):
for field in fields:
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 All @@ -1594,6 +1591,26 @@ def test_load_with_no_strip_white(self, Session):
print(fields)
print(' ')

ds_info = p.toolkit.get_action('datastore_info')({'ignore_auth': True}, {'id': resource_id})
existing_fields = ds_info.get('fields', [])
existing_info = dict(
(f['id'], f['info'])
for f in existing_fields if 'info' in f)
existing_fields_by_headers = dict((f['id'], f)
for f in existing_fields)

print(' ')
print('DEBUGGING::step 3')
print(' ')
print(existing_info)
print(' ')

print(' ')
print('DEBUGGING::step 4')
print(' ')
print(existing_fields_by_headers)
print(' ')

assert False

# Load it again with new strip_extra_white
Expand Down

0 comments on commit 6587421

Please sign in to comment.