geonode.maps.tests
==================
.. py:module:: geonode.maps.tests
Attributes
----------
.. autoapisummary::
geonode.maps.tests.logger
geonode.maps.tests.VIEWER_CONFIG
Classes
-------
.. autoapisummary::
geonode.maps.tests.MapsTest
geonode.maps.tests.TestMapForm
Module Contents
---------------
.. py:data:: logger
.. py:data:: VIEWER_CONFIG
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
{
"defaultSourceType": "gx_wmssource",
"about": {
"title": "Title",
"abstract": "Abstract"
},
"sources": {
"capra": {
"url":"http://localhost:8080/geoserver/wms"
}
},
"map": {
"projection":"EPSG:3857",
"units":"m",
"maxResolution":156543.0339,
"maxExtent":[-20037508.34,-20037508.34,20037508.34,20037508.34],
"center":[-9428760.8688778,1436891.8972581],
"layers":[{
"source":"capra",
"buffer":0,
"wms":"capra",
"name":"base:nic_admin"
}],
"keywords":["saving", "keywords"],
"zoom":7
}
}
"""
.. raw:: html
.. py:class:: MapsTest
Bases: :py:obj:`geonode.tests.utils.NotificationsTestsHelper`
Tests geonode.maps app/module
.. py:attribute:: fixtures
:value: ['initial_data.json', 'group_test_data.json', 'default_oauth_apps.json']
.. py:method:: setUpClass()
:classmethod:
.. py:method:: tearDownClass()
:classmethod:
.. py:method:: setUp()
.. py:attribute:: default_abstract
:value: 'This is a demonstration of GeoNode, an application for assembling and publishing web based...
.. py:attribute:: default_title
:value: 'GeoNode Default Map'
.. py:attribute:: viewer_config
.. py:attribute:: viewer_config_alternative
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
{
"defaultSourceType": "gx_wmssource",
"about": {
"title": "Title2",
"abstract": "Abstract2"
},
"sources": {
"capra": {
"url":"http://localhost:8080/geoserver/wms"
}
},
"map": {
"projection":"EPSG:3857",
"units":"m",
"maxResolution":156543.0339,
"maxExtent":[-20037508.34,-20037508.34,20037508.34,20037508.34],
"center":[-9428760.8688778,1436891.8972581],
"layers":[{
"source":"capra",
"buffer":0,
"wms":"capra",
"name":"base:nic_admin"
}],
"zoom":7
}
}
"""
.. raw:: html
.. py:attribute:: perm_spec
.. py:method:: test_map_to_wmc()
/maps/1/wmc -> Test map WMC export
Make some assertions about the data structure produced
for serialization to a Web Map Context Document
.. py:method:: test_describe_map(thumbnail_mock)
.. py:method:: test_ajax_map_permissions()
Verify that the ajax_dataset_permissions view is behaving as expected
.. py:method:: test_that_keyword_multiselect_is_not_disabled_for_admin_users()
Test that only admin users can create/edit keywords
.. py:method:: test_that_keyword_multiselect_is_disabled_for_non_admin_users()
Test that keyword multiselect widget is disabled when the user is not an admin
when FREETEXT_KEYWORDS_READONLY=False
.. py:method:: test_that_non_admin_user_cannot_create_edit_keyword()
Test that non admin users cannot edit/create keywords when FREETEXT_KEYWORDS_READONLY=False
.. py:method:: test_that_non_admin_user_can_create_write_to_map_without_keyword()
Test that non admin users can write to maps without creating/editing keywords
when FREETEXT_KEYWORDS_READONLY=False
.. py:method:: test_that_keyword_multiselect_is_enabled_for_non_admin_users_when_freetext_keywords_readonly_istrue()
Test that keyword multiselect widget is not disabled when the user is not an admin
and FREETEXT_KEYWORDS_READONLY=False
.. py:method:: test_that_non_admin_user_can_create_edit_keyword_when_freetext_keywords_readonly_istrue()
Test that non admin users can edit/create keywords when FREETEXT_KEYWORDS_READONLY=False
.. py:method:: test_map_metadata(thumbnail_mock)
Test that map metadata can be properly rendered
.. py:method:: test_map_embed(thumbnail_mock)
Test that map can be properly embedded
.. py:method:: test_map_view(thumbnail_mock)
Test that map view can be properly rendered
.. py:method:: test_batch_edit()
.. py:method:: test_get_legend()
.. py:method:: test_moderated_upload()
Test if moderation flag works
.. py:method:: testMapsNotifications()
.. py:class:: TestMapForm
Bases: :py:obj:`geonode.tests.base.GeoNodeBaseTestSupport`
.. py:method:: setUp() -> None
.. py:method:: test_resource_form_is_invalid_extra_metadata_not_json_format()
.. py:method:: test_resource_form_is_invalid_extra_metadata_not_schema_in_settings()
.. py:method:: test_resource_form_is_invalid_extra_metadata_invalids_schema_entry()
.. py:method:: test_resource_form_is_valid_extra_metadata()