Skip to content

Commit

Permalink
test.
Browse files Browse the repository at this point in the history
  • Loading branch information
rshewitt committed Dec 21, 2023
1 parent b68ac78 commit 2ab08d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
9 changes: 4 additions & 5 deletions tests/unit/load/ckan/test_ckan_cud.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
purge_ckan_package,
update_ckan_package,
)

from unittest.mock import patch


Expand Down Expand Up @@ -65,7 +64,7 @@ def test_dcatus_to_ckan_transform(test_dcatus_catalog):
assert DeepDiff(dcatus_to_ckan(test_dcatus_catalog), expected_result) == {}


@patch("harvester.load.create_ckan_package")
@patch("create_ckan_package")
def test_create_package(mock_create_ckan_package, ckan_entrypoint, test_ckan_package):
mock_create_ckan_package.return_value = test_ckan_package.copy()
assert (
Expand All @@ -74,7 +73,7 @@ def test_create_package(mock_create_ckan_package, ckan_entrypoint, test_ckan_pac
)


@patch("harvester.load.update_ckan_package")
@patch("update_ckan_package")
def test_update_package(
mock_update_ckan_package, ckan_entrypoint, test_ckan_update_package
):
Expand All @@ -85,7 +84,7 @@ def test_update_package(
)


@patch("harvester.load.patch_ckan_package")
@patch("patch_ckan_package")
def test_patch_package(
mock_patch_ckan_package, ckan_entrypoint, test_ckan_patch_package
):
Expand All @@ -96,7 +95,7 @@ def test_patch_package(
)


@patch("harvester.load.purge_ckan_package")
@patch("purge_ckan_package")
def test_delete_package(
mock_purge_ckan_package, ckan_entrypoint, test_ckan_purge_package
):
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/transform/test_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
from unittest.mock import patch


@patch("harvester.transform.transform")
@patch("transform")
def test_transform(mock_transform):
"""tests transform"""

files = traverse_waf("http://localhost:80", filters=["../", "dcatus/"])
downloaded_files = download_waf(files)

Expand Down

0 comments on commit 2ab08d5

Please sign in to comment.