tests.components.data.tests_int_access_control

Access control testing

class tests.components.data.tests_int_access_control.TestDataChangeOwner(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.data.fixtures.fixtures.AccessControlDataFixture object>
test_change_owner_as_superuser_ok()
test_change_owner_from_owner_to_owner_ok()
test_change_owner_from_owner_to_user_ok()
test_change_owner_from_user_to_user_raises_exception()
class tests.components.data.tests_int_access_control.TestDataDelete(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.data.fixtures.fixtures.AccessControlDataFixture object>
test_delete_others_data_in_accessible_workspace_deletes_data(**kwargs)
test_delete_others_data_not_accessible_workspace_raises_error(**keywargs)
test_delete_others_data_not_in_workspace_raises_error(**keywargs)
test_delete_own_data_in_accessible_workspace_deletes_data(**kwargs)
test_delete_own_data_in_not_accessible_workspace_deletes_data(**kwargs)
test_delete_own_data_not_in_workspace_deletes_data(**kwargs)
class tests.components.data.tests_int_access_control.TestDataExecuteQuery(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.data.fixtures.fixtures.AccessControlDataFixture object>
test_execute_query_as_superuser_returns_all_data()
test_execute_query_force_workspace_1_does_not_return_data_if_no_access(**keywargs)
test_execute_query_force_workspace_1_returns_data_from_workspace_1(**keywargs)
test_execute_query_force_workspace_none_does_not_return_data_if_no_access(**keywargs)
test_execute_query_returns_data(**keywargs)
test_execute_query_returns_data_in_workspace_1(**keywargs)
test_execute_query_returns_data_in_workspace_1_and_2(**keywargs)
test_execute_query_returns_data_in_workspace_2(**keywargs)
class tests.components.data.tests_int_access_control.TestDataGetAll(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.data.fixtures.fixtures.AccessControlDataFixture object>
test_get_all_as_superuser_returns_all_data()
test_get_all_as_user_raises_error()
class tests.components.data.tests_int_access_control.TestDataGetAllByUser(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.data.fixtures.fixtures.AccessControlDataFixture object>
test_get_all_by_user_as_superuser_returns_own_data()
test_get_all_by_user_returns_no_data_if_owns_zero(**keywargs)
test_get_all_by_user_returns_owned_data(**keywargs)
test_get_all_returns_data(**keywargs)
class tests.components.data.tests_int_access_control.TestDataGetAllExceptUser(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.data.fixtures.fixtures.AccessControlDataFixture object>
test_get_all_except_user_as_superuser_returns_others_data()
test_get_all_except_user_raises_error_data_if_workspace_access(**keywargs)
test_get_all_except_user_raises_error_if_no_workspace_access(**keywargs)
class tests.components.data.tests_int_access_control.TestDataGetById(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.data.fixtures.fixtures.AccessControlDataFixture object>
test_get_by_id_not_owner_no_workspace_raises_error()
test_get_by_id_owner_no_workspace_read_access_returns_data()
test_get_by_id_owner_with_read_access_returns_data(**keywargs)
test_get_by_id_owner_without_read_access_returns_data(**keywargs)
test_get_by_id_user_without_read_access_raises_error(**keywargs)
class tests.components.data.tests_int_access_control.TestDataUpsert(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase