geonode.api.tests ================= .. py:module:: geonode.api.tests Attributes ---------- .. autoapisummary:: geonode.api.tests.logger Classes ------- .. autoapisummary:: geonode.api.tests.PermissionsApiTests geonode.api.tests.SearchApiTests geonode.api.tests.ThesauriApiTests Module Contents --------------- .. py:data:: logger .. py:class:: PermissionsApiTests Bases: :py:obj:`tastypie.test.ResourceTestCaseMixin`, :py:obj:`geonode.tests.base.GeoNodeBaseTestSupport` .. py:method:: setUpClass() :classmethod: .. py:method:: tearDownClass() :classmethod: .. py:method:: setUp() .. py:method:: test_dataset_get_list_unauth_all_public() Test that the correct number of layers are returned when the client is not logged in and all are public .. py:method:: test_datasets_get_list_unauth_some_public() Test that if a layer is not public then not all are returned when the client is not logged in .. py:method:: test_datasets_get_list_auth_some_public() Test that if a layer is not public then all are returned if the client is not logged in .. py:method:: test_dataset_get_list_dataset_private_to_one_user() Test that if a layer is only visible by admin, then does not appear in the unauthenticated list nor in the list when logged is as bobby .. py:method:: test_dataset_get_detail_unauth_dataset_not_public() Test that layer detail gives 404 when not public and not logged in .. py:method:: test_new_user_has_access_to_old_datasets() Test that a new user can access the public available layers .. py:method:: test_outh_token() .. py:method:: test_api_lockdown_false() .. py:method:: test_profiles_lockdown() .. py:method:: test_owners_lockdown() .. py:method:: test_groups_lockdown() .. py:method:: test_regions_lockdown() .. py:method:: test_tags_lockdown() .. py:class:: SearchApiTests Bases: :py:obj:`tastypie.test.ResourceTestCaseMixin`, :py:obj:`geonode.tests.base.GeoNodeBaseTestSupport` Test the search .. py:attribute:: fixtures :value: ['initial_data.json', 'group_test_data.json', 'default_oauth_apps.json', 'test_thesaurus.json'] .. py:method:: setUpClass() :classmethod: .. py:method:: tearDownClass() :classmethod: .. py:method:: setUp() .. py:method:: test_profiles_filters() Test profiles filtering .. py:method:: test_groups_filters() Test groups filtering .. py:method:: test_category_filters() Test category filtering .. py:method:: test_metadata_filters() Test category filtering .. py:method:: test_tag_filters() Test keywords filtering .. py:method:: test_owner_filters() Test owner filtering .. py:method:: test_title_filter() Test title filtering .. py:method:: test_date_filter() Test date filtering .. py:method:: test_extended_text_filter() Test that the extended text filter works as expected .. py:method:: test_the_api_should_return_all_datasets_with_metadata_false() .. py:method:: test_the_api_should_return_all_datasets_with_metadata_true() .. py:method:: test_the_api_should_return_all_documents_with_metadata_false() .. py:method:: test_the_api_should_return_all_documents_with_metadata_true() .. py:method:: test_the_api_should_return_all_maps_with_metadata_false() .. py:method:: test_the_api_should_return_all_maps_with_metadata_true() .. py:method:: test_api_will_return_a_valid_json_response() .. py:method:: test_will_return_empty_if_the_thesaurus_does_not_exists() .. py:method:: test_will_return_keywords_for_the_selected_thesaurus_if_exists() .. py:method:: test_will_return_empty_if_the_alt_label_does_not_exists() .. py:method:: test_will_return_keywords_for_the_selected_alt_label_if_exists() .. py:method:: test_will_return_empty_if_the_kaywordId_does_not_exists() .. py:method:: test_will_return_expected_keyword_label_for_existing_lang(lang) .. py:method:: test_will_return_default_keyword_label_for_not_existing_lang(lang) .. py:method:: test_the_api_should_return_all_map_categories_with_metadata_false() .. py:method:: test_the_api_should_return_all_map_categories_with_metadata_true() .. py:method:: test_the_api_should_return_all_document_categories_with_metadata_false() .. py:method:: test_the_api_should_return_all_document_categories_with_metadata_true() .. py:class:: ThesauriApiTests Bases: :py:obj:`geonode.tests.base.GeoNodeBaseTestSupport` .. py:method:: setUpClass() :classmethod: .. py:method:: tearDownClass() :classmethod: .. py:method:: setUp() .. py:method:: _create_thesauri() :classmethod: .. py:method:: _create_resources() :classmethod: .. py:method:: test_resources_filtered()