geonode.harvesting.tests.test_api_serializers ============================================= .. py:module:: geonode.harvesting.tests.test_api_serializers Attributes ---------- .. autoapisummary:: geonode.harvesting.tests.test_api_serializers._REQUEST_FACTORY Classes ------- .. autoapisummary:: geonode.harvesting.tests.test_api_serializers.BriefHarvesterSerializerTestCase geonode.harvesting.tests.test_api_serializers.HarvesterSerializerTestCase geonode.harvesting.tests.test_api_serializers.BriefAsynchronousHarvestingSessionSerializerTestCase geonode.harvesting.tests.test_api_serializers.HarvestableResourceSerializerTestCase Module Contents --------------- .. py:data:: _REQUEST_FACTORY .. py:class:: BriefHarvesterSerializerTestCase Bases: :py:obj:`geonode.tests.base.GeoNodeBaseTestSupport` .. py:attribute:: remote_url :value: 'test.com' .. py:attribute:: name :value: 'This is geonode harvester' .. py:attribute:: user .. py:attribute:: harvester_type :value: 'geonode.harvesting.harvesters.geonodeharvester.GeonodeUnifiedHarvesterWorker' .. py:method:: setUpTestData() :classmethod: .. py:method:: test_serializer_is_able_to_serialize_model_instance() .. py:class:: HarvesterSerializerTestCase Bases: :py:obj:`geonode.tests.base.GeoNodeBaseTestSupport` .. py:attribute:: remote_url :value: 'test.com' .. py:attribute:: name :value: 'This is geonode harvester' .. py:attribute:: user .. py:attribute:: harvester_type :value: 'geonode.harvesting.harvesters.geonodeharvester.GeonodeUnifiedHarvesterWorker' .. py:method:: setUpTestData() :classmethod: .. py:method:: test_serializer_is_able_to_serialize_model_instance() .. py:method:: test_validate_also_validates_worker_specific_config(mock_validate_config) .. py:method:: test_validate_does_not_allow_changing_status_and_worker_specific_config() .. py:method:: test_create_does_not_allow_setting_custom_status() .. py:method:: test_create() .. py:method:: test_update_errors_out_if_current_status_is_not_ready() .. py:method:: test_update_errors_out_when_client_tries_to_set_status_ready() .. py:method:: test_update_calls_update_harvestable_resources_task(mock_tasks) .. py:method:: test_update_calls_harvesting_dispatcher_task(mock_tasks) .. py:method:: test_update_calls_update_harvester_availability_task(mock_tasks) .. py:method:: test_update_updates_harvestable_resources_whenever_worker_config_changes(mock_tasks) .. py:class:: BriefAsynchronousHarvestingSessionSerializerTestCase Bases: :py:obj:`geonode.tests.base.GeoNodeBaseTestSupport` .. py:attribute:: harvester :type: geonode.harvesting.models.Harvester .. py:method:: setUpTestData() :classmethod: .. py:method:: test_serializer_is_able_to_serialize_model_instance() .. py:class:: HarvestableResourceSerializerTestCase Bases: :py:obj:`geonode.tests.base.GeoNodeBaseTestSupport` .. py:attribute:: unique_identifier :value: 'some-identifier' .. py:attribute:: title :value: 'something' .. py:attribute:: remote_resource_type :value: 'documents' .. py:attribute:: default_should_be_harvested :value: False .. py:method:: setUpTestData() :classmethod: .. py:method:: test_serializer_is_able_to_serialize_model_instance() .. py:method:: test_serializer_is_allowed_to_change_instance_should_be_harvested_attribute()