geonode.base.api.tests
Attributes
Classes
Module Contents
- class geonode.base.api.tests.BaseApiTests[source]
Bases:
rest_framework.test.APITestCase- fixtures = ['initial_data.json', 'group_test_data.json', 'default_oauth_apps.json', 'test_thesaurus.json'][source]
Calling the resources endpoint of the groups should return also the group permission on that specific resource
Calling the resources endpoint of the user should return also the user permission on that specific resource
- test_resource_serializer_validation()[source]
Testing serializing and deserializing of a Dataset base on django-rest description: https://www.django-rest-framework.org/api-guide/serializers/#deserializing-objects
- test_featured_and_published_resources()[source]
Ensure we can Get & Set Permissions across the Resource Base list.
- test_get_favorites_is_returned_in_the_base_endpoint_per_user()[source]
Ensure we get user’s favorite resources.
- test_get_favorites_is_returned_in_the_base_endpoint()[source]
Ensure we get user’s favorite resources.
- test_create_and_delete_favorites()[source]
Ensure we can add and remove resources to user’s favorite.
- test_search_resources_with_favorite_true_and_no_favorite_should_return_0()[source]
Ensure we can search across the Resource Base list.
- test_search_resources_with_favorite_true_and_favorite_should_return_1()[source]
Ensure we can search across the Resource Base list.
- test_thumbnail_urls()[source]
Ensure the thumbnail url reflects the current active Thumb on the resource.
- test_set_thumbnail_from_bbox_from_Anonymous_user_raise_permission_error()[source]
Given a request with Anonymous user, should raise an authentication error.
- test_set_thumbnail_from_bbox_from_logged_user_for_existing_dataset(mock_create_thumbnail)[source]
Given a logged User and an existing dataset, should create the expected thumbnail url.
- test_set_thumbnail_from_bbox_from_logged_user_for_not_existing_dataset()[source]
Given a logged User and an not existing dataset, should raise a 404 error.
- test_set_thumbnail_from_bbox_from_logged_user_for_existing_doc()[source]
Given a logged User and an existing doc, should raise a NotImplemented.
- test_set_thumbnail_from_bbox_from_logged_user_for_existing_dataset_raise_exp(mock_exp)[source]
Given a logged User and an existing dataset, should raise a ThumbnailException.
- test_manager_can_edit_map()[source]
REST API must not forbid saving maps and apps to non-admin and non-owners.
- test_base_resources_return_download_link_if_document()[source]
Ensure we can access the Resource Base list.
- test_base_resources_return_download_link_if_dataset()[source]
Ensure we can access the Resource Base list.
- test_base_resources_dont_return_download_link_if_map()[source]
Ensure we can access the Resource Base list.
- test_base_resources_return_not_download_links_for_maps()[source]
Ensure we can access the Resource Base list.