Skip to content

Commit

Permalink
Add tests for dataset activities and non-CKAN datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
u10313335 committed Jun 27, 2024
1 parent 4ad04ea commit 2945d83
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions binderhub/tests/test_repoproviders.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,31 @@ async def test_dataverse(
"https://demo.ckan.org/dataset/sample-dataset-1",
"ckan-sample-dataset-1",
],
[
"https://demo.datashades.com/dataset/chart-test?activity_id=061888e9-e3c2-4769-b097-9c195a841e2f",
"https://demo.datashades.com/dataset/chart-test?activity_id=061888e9-e3c2-4769-b097-9c195a841e2f",
"chart-test.v1717501747",
"https://demo.datashades.com/dataset/chart-test?activity_id=061888e9-e3c2-4769-b097-9c195a841e2f",
"ckan-chart-test",
],
[
"https://demo.datashades.com/dataset/chart-test/history/061888e9-e3c2-4769-b097-9c195a841e2f",
"https://demo.datashades.com/dataset/chart-test/history/061888e9-e3c2-4769-b097-9c195a841e2f",
"chart-test.v1717501747",
"https://demo.datashades.com/dataset/chart-test/history/061888e9-e3c2-4769-b097-9c195a841e2f",
"ckan-chart-test",
],
["https://demo.ckan.org/group/roger", None, None, None, None],
["https://demo.ckan.org/dataset/nosuchdataset", None, None, None, None],
],
)
async def test_ckan(spec, resolved_spec, resolved_ref, resolved_ref_url, build_slug):
provider = CKANProvider(spec=spec)

ref = await provider.get_resolved_ref()
if not resolved_ref:
# We are done here if we don't expect to resolve
return
assert resolved_ref in ref

slug = provider.get_build_slug()
Expand Down

0 comments on commit 2945d83

Please sign in to comment.