Skip to content

Commit

Permalink
add back ckan entrypoint fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
rshewitt committed Jan 3, 2024
1 parent d419c50 commit 9661590
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/unit/load/ckan/conftest.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
from pathlib import Path
import pytest
from harvester.load import dcatus_to_ckan
import os
from harvester.load import dcatus_to_ckan, create_ckan_entrypoint
from harvester.utils.json import open_json

TEST_DIR = Path(__file__).parents[3]
HARVEST_SOURCES = TEST_DIR / "harvest-sources"


@pytest.fixture
def ckan_entrypoint():
catalog_dev_api_key = os.getenv("CKAN_API_TOKEN_DEV") # gha
if catalog_dev_api_key is None: # local
import credentials

catalog_dev_api_key = credentials.ckan_catalog_dev_api_key

return create_ckan_entrypoint("https://catalog-dev.data.gov/", catalog_dev_api_key)


@pytest.fixture
def test_ckan_package_id():
return "e875348b-a7c3-47eb-b0c3-168d978b0c0f"
Expand Down

1 comment on commit 9661590

@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
25 0 💤 0 ❌ 0 🔥 17.172s ⏱️

Please sign in to comment.