accounts.test package

Submodules

accounts.test.test_views module

class accounts.test.test_views.TestGetUser(methodName='runTest')

Bases: rest_framework.test.APITestCase

setUp()
test_get_current_user()

Tests calling the GetUser view when authenticated as a basic user.

test_get_current_user_staff()

Tests calling the GetUser view when authenticated as a staff user.

test_get_current_user_unauthorized()

Tests calling the GetUser view without being authenticated.

class accounts.test.test_views.TestUserDetail(methodName='runTest')

Bases: rest_framework.test.APITransactionTestCase

setUp()
test_delete_user_other_regular_user()
test_delete_user_other_staff_user()
test_delete_user_self()
test_delete_user_unauthorized()
test_edit_user_regular_set_staff_unauthorized()

Validate a regular user cannot promote themselves to staff user

test_edit_user_self_details()
test_edit_user_staff_promote()

Validate a staff user can promote others to staff user

test_edit_user_unauthorized()
test_get_user_self()
test_get_user_unauthorized()
class accounts.test.test_views.TestUserList(methodName='runTest')

Bases: rest_framework.test.APITransactionTestCase

setUp()
test_create_user_by_id_regular_user_unauthorized()
test_create_user_from_staff_user_successful()
test_create_user_unauthorized()
test_get_user_list_from_staff_user_successful()
test_get_user_list_regular_user_unauthorized()
test_get_user_list_unauthorized()

Module contents