geonode.security.tests
Attributes
Classes
Fake file-like stream object that redirects writes to a logger instance. |
|
Tests for the Geonode security app. |
|
Test resources synchronization with Guardian and dirty states cleaning |
|
Ensure that the Permission classes behaves as expected |
Functions
|
Module Contents
- class geonode.security.tests.StreamToLogger(logger, log_level=logging.INFO)[source]
Fake file-like stream object that redirects writes to a logger instance.
- class geonode.security.tests.SecurityTests[source]
Bases:
tastypie.test.ResourceTestCaseMixin,geonode.tests.base.GeoNodeBaseTestSupportTests for the Geonode security app.
- test_login_middleware_with_basic_auth()[source]
Tests the Geonode login required authentication middleware with Basic authenticated queries
- test_login_middleware_with_custom_login_url()[source]
Tests the Geonode login required authentication middleware with Basic authenticated queries
- test_session_ctrl_middleware()[source]
Tests the Geonode session control authentication middleware.
- test_set_bulk_permissions()[source]
Test that after restrict view permissions on two layers bobby is unable to see them
- test_bobby_cannot_set_all()[source]
Test that Bobby can set the permissions only on the ones for which he has the right
- test_perm_specs_synchronization()[source]
Test that Dataset is correctly synchronized with guardian: 1. Set permissions to all users 2. Set permissions to a single user 3. Set permissions to a group of users 4. Try to sync a layer from GeoServer
- test_maplayers_default_permissions()[source]
Verify that Dataset.set_default_permissions is behaving as expected
- test_set_dataset_permissions()[source]
Verify that the set_dataset_permissions view is behaving as expected
- test_ajax_dataset_permissions()[source]
Verify that the ajax_dataset_permissions view is behaving as expected
- test_get_visible_resources_should_return_resource_with_metadata_only_true()[source]
If metadata only is provided, it should return only the metadata resources
- class geonode.security.tests.SecurityRulesTests[source]
Bases:
django.test.testcases.TestCaseTest resources synchronization with Guardian and dirty states cleaning
- class geonode.security.tests.SetPermissionsTestCase[source]
Bases:
geonode.tests.base.GeoNodeBaseTestSupport- test_set_compact_permissions()[source]
- AUTO PUBLISHING - test_set_compact_permissions
RESOURCE_PUBLISHING = False
ADMIN_MODERATE_UPLOADS = False
- test_permissions_are_set_as_expected_resource_publishing_True()[source]
- SIMPLE PUBLISHING - test_permissions_are_set_as_expected_resource_publishing_True
RESOURCE_PUBLISHING = True (Autopublishing is disabled)
ADMIN_MODERATE_UPLOADS = False
- test_permissions_are_set_as_expected_admin_upload_resource_publishing_True()[source]
- ADVANCED WORKFLOW - test_permissions_are_set_as_expected_admin_upload_resource_publishing_True
RESOURCE_PUBLISHING = True
ADMIN_MODERATE_UPLOADS = True
- test_permissions_are_set_as_expected_admin_upload_resource_publishing_False()[source]
- AUTO PUBLISHING - test_permissions_are_set_as_expected_admin_upload_resource_publishing_False
RESOURCE_PUBLISHING = False
ADMIN_MODERATE_UPLOADS = False
- test_permissions_on_user_role_promotion_to_manager()[source]
- ADVANCED WORKFLOW - test_permissions_on_user_role_promotion_to_manager
RESOURCE_PUBLISHING = True
ADMIN_MODERATE_UPLOADS = True
- test_permissions_on_user_role_demote_to_member()[source]
- ADVANCED WORKFLOW - test_permissions_on_user_role_demote_to_member
RESOURCE_PUBLISHING = True
ADMIN_MODERATE_UPLOADS = True
- class geonode.security.tests.TestUserHasPerms[source]
Bases:
geonode.tests.base.GeoNodeBaseTestSupportEnsure that the Permission classes behaves as expected