onadata.apps.api.tests.models package

Submodules

onadata.apps.api.tests.models.test_abstract_models module

class onadata.apps.api.tests.models.test_abstract_models.TestAbstractModels(methodName='runTest')

Bases: TestBase

onadata.apps.api.tests.models.test_odk_token module

Test ODK Token module

class onadata.apps.api.tests.models.test_odk_token.TestODKToken(methodName='runTest')

Bases: TestAbstractModels

test_create_odk_token()

Test that ODK Tokens can be created

onadata.apps.api.tests.models.test_organization_profile module

class onadata.apps.api.tests.models.test_organization_profile.TestOrganizationProfile(methodName='runTest')

Bases: TestBase

test_create_organization_creates_team_and_perms()
test_delete_organization()
test_disallow_same_username_with_different_cases()
test_optional_organization_active_status()

Test that setting ORG_ON_CREATE_IS_ACTIVE changes the default Organization is_active status

onadata.apps.api.tests.models.test_project module

class onadata.apps.api.tests.models.test_project.TestProject(methodName='runTest')

Bases: TestAbstractModels, TestBase

test_create_organization_project()
test_project_detetion_reverts_when_an_exception_raised()

Testing transaction.atomic on Project.soft_delete.

The database should roll back changes made during the soft_delete of a project if deleting its linked XForms fail.

This works on the premise that in STRICT mode XForm id_strings should not have spaces in them.

test_project_soft_delete_works_when_no_exception_is_raised()

Testing transaction.atomic on Project.soft_delete.

One should be able to soft_delete a project when no exceptions are raised during the soft_deletion.

onadata.apps.api.tests.models.test_team module

class onadata.apps.api.tests.models.test_team.TestTeam(methodName='runTest')

Bases: TestAbstractModels

test_add_project_perms_to_team()
test_add_team_to_project()
test_assign_user_to_team()
test_create_organization_team()

onadata.apps.api.tests.models.test_temp_token module

class onadata.apps.api.tests.models.test_temp_token.TestTempToken(methodName='runTest')

Bases: TestAbstractModels

test_temp_token_creation()

Module contents