onadata.libs.tests package

Submodules

onadata.libs.tests.test_authentication module

class onadata.libs.tests.test_authentication.TestLockout(methodName='runTest')

Bases: django.test.testcases.TestCase

Test user lockout functions.

setUp()

Hook method for setting up the test fixture before exercising it.

test_check_lockout()

Test check_lockout() function.

class onadata.libs.tests.test_authentication.TestPermissions(methodName='runTest')

Bases: django.test.testcases.TestCase

setUp()

Hook method for setting up the test fixture before exercising it.

test_invalid_bytes_in_digest()
class onadata.libs.tests.test_authentication.TestTempTokenAuthentication(methodName='runTest')

Bases: django.test.testcases.TestCase

setUp()

Hook method for setting up the test fixture before exercising it.

test_authenticates_if_token_is_valid()
test_expired_temp_token()
test_inactive_user()
test_invalid_temp_token()
class onadata.libs.tests.test_authentication.TestTempTokenURLParameterAuthentication(methodName='runTest')

Bases: django.test.testcases.TestCase

setUp()

Hook method for setting up the test fixture before exercising it.

test_returns_false_if_no_param()

onadata.libs.tests.test_permissions module

Tests onadata.libs.permissions module

class onadata.libs.tests.test_permissions.TestPermissions(methodName='runTest')

Bases: onadata.apps.main.tests.test_base.TestBase

Tests for onadata.libs.permissions module

test_filter_queryset_xform_meta_perms_sql(check_meta_mock)

Test filter query by meta permissions.

test_get_object_users_with_permission()

Test get_object_users_with_permissions()

test_manager_has_role()

Test manager has role

test_manager_role_add()

Test adding ManagerRole

test_readonly_no_downloads_has_role()

Test readonly no downloads role.

test_reassign_role()

Test role reassignment.

test_reassign_role_owner_to_editor()

Test role reassignment owner to editor.

onadata.libs.tests.test_permissions.perms_for(user, obj)

Return user permissions for obj.

Module contents