Skip to content

Commit

Permalink
limit field returns from query
Browse files Browse the repository at this point in the history
  • Loading branch information
rshewitt committed Jan 3, 2024
1 parent c259e33 commit 8cfe987
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/integration/compare/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ def data_sources(ckan_entrypoint):
) # the extract needs to be sorted

ckan_source_datasets = search_ckan(
ckan_entrypoint, {"q": 'harvest_source_name:"test_harvest_source_name"'}
ckan_entrypoint,
{
"q": 'harvest_source_name:"test_harvest_source_name"',
"fl": [
"extras_harvest_source_name",
"extras_dcat_metadata",
"extras_identifier",
],
},
)["results"]

ckan_source = {}

for d in ckan_source_datasets:
orig_meta = None
orig_id = None
for e in d["extras"]:
if e["key"] == "dcat_metadata":
orig_meta = eval(e["value"], {"__builtins__": {}})
if e["key"] == "identifier":
orig_id = e["value"]

ckan_source[orig_id] = dataset_to_hash(
orig_meta
ckan_source[d["identifier"]] = dataset_to_hash(
eval(d["dcat_metadata"], {"__builtins__": {}})
) # the response is stored sorted

return harvest_source, ckan_source

1 comment on commit 8cfe987

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
harvester
   __init__.py120100% 
   compare.py120100% 
   extract.py4877 85%
   load.py1001010 90%
   transform.py1377 46%
harvester/utils
   __init__.py30100% 
   json.py40100% 
   util.py70100% 
harvester/validate
   __init__.py20100% 
   dcat_us.py2433 88%
TOTAL2252788% 

Tests Skipped Failures Errors Time
26 0 💤 0 ❌ 0 🔥 47.635s ⏱️

Please sign in to comment.