geonode.upload.tests.integration ================================ .. py:module:: geonode.upload.tests.integration .. autoapi-nested-parse:: See the README.rst in this directory for details on running these tests. - @todo allow using a database other than `development.db` - for some reason, a test db is not created when running using normal settings - @todo when using database settings, a test database is used and this makes it difficult for cleanup to track the layers created between runs - @todo only test_time seems to work correctly with database backend test settings Attributes ---------- .. autoapisummary:: geonode.upload.tests.integration.GEONODE_USER geonode.upload.tests.integration.GEONODE_PASSWD geonode.upload.tests.integration.GEONODE_URL geonode.upload.tests.integration.GEOSERVER_URL geonode.upload.tests.integration.DB_HOST geonode.upload.tests.integration.DB_PORT geonode.upload.tests.integration.DB_NAME geonode.upload.tests.integration.DB_USER geonode.upload.tests.integration.DB_PASSWORD geonode.upload.tests.integration.DATASTORE_URL geonode.upload.tests.integration.postgis_db geonode.upload.tests.integration.logger Classes ------- .. autoapisummary:: geonode.upload.tests.integration.UploaderBase geonode.upload.tests.integration.TestUpload geonode.upload.tests.integration.TestUploadDBDataStore Functions --------- .. autoapisummary:: geonode.upload.tests.integration.get_wms Module Contents --------------- .. py:data:: GEONODE_USER :value: 'admin' .. py:data:: GEONODE_PASSWD :value: 'admin' .. py:data:: GEONODE_URL .. py:data:: GEOSERVER_URL .. py:data:: DB_HOST .. py:data:: DB_PORT .. py:data:: DB_NAME .. py:data:: DB_USER .. py:data:: DB_PASSWORD .. py:data:: DATASTORE_URL .. py:data:: postgis_db .. py:data:: logger .. py:function:: get_wms(version='1.1.1', type_name=None, username=None, password=None) Function to return an OWSLib WMS object .. py:class:: UploaderBase Bases: :py:obj:`geonode.tests.base.GeoNodeBaseTestSupport` .. py:attribute:: type :value: 'dataset' .. py:method:: setUpClass() :classmethod: .. py:method:: tearDownClass() :classmethod: .. py:method:: setUp() .. py:method:: _post_teardown() .. py:method:: tearDown() .. py:method:: check_dataset_geonode_page(path) Check that the final dataset page render's correctly after an dataset is uploaded .. py:method:: check_dataset_geoserver_caps(type_name) Check that a dataset shows up in GeoServer's get capabilities document .. py:method:: check_dataset_geoserver_rest(dataset_name) Check that a dataset shows up in GeoServer rest api after the uploader is done .. py:method:: check_and_pass_through_timestep(redirect_to) .. py:method:: complete_raster_upload(file_path, resp, data) .. py:method:: check_save_step(resp, data) Verify the initial save step .. py:method:: complete_upload(file_path, resp, data, is_raster=False) Check if a dataset was correctly uploaded to GeoNode. This method verifies if a dataset is configured properly in both Django and GeoServer. :param file_path: Path to the dataset file. :type file_path: str :param response: Django HTTP response object. :type response: HttpResponse :param Checks: :param ------: :param - Verifies if the dataset is configured in Django.: :param - Verifies if the dataset is configured in GeoServer: - Checks the REST API. - Checks the GetCapabilities document. .. py:method:: finish_upload(current_step, dataset_name, is_raster=False, skip_srs=False) .. py:method:: check_upload_model(original_name) .. py:method:: check_dataset_complete(dataset_page, original_name) Check everything to verify the dataset is complete .. py:method:: check_invalid_projection(dataset_name, resp, data) Makes sure that we got the correct response from an dataset that can't be uploaded .. py:method:: check_upload_complete(dataset_name, resp, data) Makes sure that we got the correct response from an dataset that has been uploaded .. py:method:: check_upload_failed(dataset_name, resp, data) Makes sure that we got the correct response from an dataset that can't be uploaded .. py:method:: upload_folder_of_files(folder, final_check, session_ids=None) .. py:method:: upload_file(fname, final_check, check_name=None, session_ids=None) .. py:method:: wait_for_progress(progress_url, wait_for_progress_cnt=0) .. py:method:: temp_file(ext) .. py:method:: make_csv(fieldnames, *rows) .. py:class:: TestUpload Bases: :py:obj:`UploaderBase` .. py:method:: test_shp_upload() Tests if a vector dataset can be uploaded to a running GeoNode/GeoServer .. py:method:: test_raster_upload() Tests if a raster dataset can be upload to a running GeoNode GeoServer .. py:method:: test_zipped_upload() Test uploading a zipped shapefile .. py:method:: test_geonode_same_UUID_error() Ensure a new dataset with same UUID metadata cannot be uploaded .. py:method:: test_ascii_grid_upload() Tests the layers that ASCII grid files are uploaded along with aux .. py:method:: test_invalid_dataset_upload() Tests the layers that are invalid and should not be uploaded .. py:method:: test_coherent_importer_session() Tests that the upload computes correctly next session IDs .. py:method:: test_extension_not_implemented() Verify a error message is return when an unsupported dataset is uploaded .. py:method:: test_csv() Make sure a csv upload fails gracefully/normally when not activated .. py:method:: test_csv_with_size_limit() Make sure a upload fails gracefully/normally with big files .. py:method:: test_csv_with_upload_handler_size_limit() Make sure a upload fails gracefully/normally with big files .. py:class:: TestUploadDBDataStore Bases: :py:obj:`UploaderBase` .. py:method:: test_csv() Override the baseclass test and verify a correct CSV upload .. py:method:: test_time() Verify that uploading time based shapefile works properly .. py:method:: test_configure_time()