geonode.upload.api.tests ======================== .. py:module:: geonode.upload.api.tests Attributes ---------- .. autoapisummary:: geonode.upload.api.tests.LIVE_SERVER_URL geonode.upload.api.tests.GEOSERVER_URL geonode.upload.api.tests.CURRENT_LOCATION geonode.upload.api.tests.logger Classes ------- .. autoapisummary:: geonode.upload.api.tests.UploadApiTests geonode.upload.api.tests.UploadSizeLimitTests geonode.upload.api.tests.UploadParallelismLimitTests Module Contents --------------- .. py:data:: LIVE_SERVER_URL :value: 'http://localhost:8001/' .. py:data:: GEOSERVER_URL .. py:data:: CURRENT_LOCATION .. py:data:: logger .. py:class:: UploadApiTests Bases: :py:obj:`geonode.tests.base.GeoNodeLiveTestSupport`, :py:obj:`rest_framework.test.APITestCase` .. py:attribute:: port :value: 0 .. py:method:: setUpClass() :classmethod: .. py:method:: tearDownClass() :classmethod: Quit selenium driver instance .. py:method:: setUp() .. py:method:: tearDown() .. py:method:: set_session_cookies(url=None) .. py:method:: click_button(label) .. py:method:: do_login(username=GEONODE_USER, password=GEONODE_PASSWD) Method to login the GeoNode site .. py:method:: do_logout() .. py:method:: do_upload_step(step=None) .. py:method:: as_superuser() .. py:method:: live_upload_file(_file) function that uploads a file, or a collection of files, to the GeoNode .. py:method:: test_rest_uploads() Ensure we can access the Local Server Uploads list. .. py:method:: test_rest_uploads_non_interactive() Ensure we can access the Local Server Uploads list. .. py:method:: _cleanup_layer(layer_name) .. py:method:: test_rest_uploads_with_size_limit(mocked_uploaded_file) Try to upload a file larger than allowed by ``dataset_upload_size`` but not larger than ``file_upload_handler`` max_size. .. py:method:: test_rest_uploads_with_parallelism_limit(mocked_uploaded_file) Try to upload a file when there are many others being handled. .. py:class:: UploadSizeLimitTests Bases: :py:obj:`rest_framework.test.APITestCase` .. py:attribute:: fixtures :value: ['group_test_data.json'] .. py:method:: setUpClass() :classmethod: .. py:method:: test_list_size_limits_admin_user() .. py:method:: test_list_size_limits_anonymous_user() .. py:method:: test_retrieve_size_limit_admin_user() .. py:method:: test_retrieve_size_limit_anonymous_user() .. py:method:: test_patch_size_limit_admin_user() .. py:method:: test_patch_size_limit_anonymous_user() .. py:method:: test_put_size_limit_admin_user() .. py:method:: test_put_size_limit_anonymous_user() .. py:method:: test_post_size_limit_admin_user() .. py:method:: test_post_size_limit_anonymous_user() .. py:method:: test_delete_size_limit_admin_user() .. py:method:: test_delete_size_limit_anonymous_user() .. py:class:: UploadParallelismLimitTests Bases: :py:obj:`rest_framework.test.APITestCase` .. py:attribute:: fixtures :value: ['group_test_data.json'] .. py:method:: setUpClass() :classmethod: .. py:method:: test_list_parallelism_limits_admin_user() .. py:method:: test_list_parallelism_limits_anonymous_user() .. py:method:: test_retrieve_parallelism_limit_admin_user() .. py:method:: test_retrieve_parallelism_limit_norman_user() .. py:method:: test_patch_parallelism_limit_admin_user() .. py:method:: test_patch_parallelism_limit_norman_user() .. py:method:: test_patch_parallelism_limit_anonymous_user() .. py:method:: test_put_parallelism_limit_admin_user() .. py:method:: test_put_parallelism_limit_anonymous_user() .. py:method:: test_post_parallelism_limit_admin_user() .. py:method:: test_post_parallelism_limit_anonymous_user() .. py:method:: test_delete_parallelism_limit_admin_user() .. py:method:: test_delete_parallelism_limit_admin_user_protected() .. py:method:: test_delete_parallelism_limit_anonymous_user()