geonode.harvesting.tests.test_tasks
Classes
Module Contents
- class geonode.harvesting.tests.test_tasks.TasksTestCase[source]
Bases:
geonode.tests.base.GeoNodeBaseTestSupport- harvester: geonode.harvesting.models.Harvester[source]
- test_harvest_resource_updates_geonode_when_remote_resource_exists(mock_update_asynchronous_session)[source]
Test that worker.get_resource() is called by the _harvest_resource() task and that the related workflow is called too.
Verify that worker.get_resource() is always called. Then verify that if the result of worker.get_resource() is not None, the worker.update_geonode_resource() is called and worker.update_harvesting_session() is called too.
- test_harvest_resource_does_not_update_geonode_when_remote_resource_does_not_exist()[source]
Test that the worker does not try to update existing GeoNode resources when the remote resource cannot be harvested.