Test the user¶
Test the user management¶
The user management tests.
- class TestCreateUserView(methodName='runTest')¶
Bases:
TestCase
Test the create user view.
- test_get_method_create_user() None ¶
Test the http status of render the create user form.
- test_post_method_create_user() None ¶
Test the http status and msg of submit the create form.
- class TestUpdateUserView(methodName='runTest')¶
Bases:
UserAuthTestCase
Test the update user view.
- test_get_method_update_user_by_user() None ¶
Test update user by owner, the http status of form render.
- test_post_method_update_user_by_user() None ¶
Test update user by owner, the http status of form submit.
- test_post_method_update_user_by_another_user() None ¶
Test to permission denied to update user for another user.
- test_post_method_update_user_by_anonymous() None ¶
Test to permission denied to update user for anonymous.
- class TestDeleteUserView(methodName='runTest')¶
Bases:
UserAuthTestCase
Test the delete user view.
- test_get_method_delete_user_by_user() None ¶
Test delete user by owner, the http status of form render.
- test_post_method_delete_user_by_user() None ¶
Test delete user by owner, the http status of form submit.
- test_post_method_delete_user_by_another_user() None ¶
Tes delete user by another user.
- test_post_method_delete_user_by_anonymous() None ¶
Test delete user by anonymous.
- class TestUserListView(methodName='runTest')¶
Bases:
UserAuthTestCase
Test the user list view.
- test_show_user_list_to_admin() None ¶
Test display user list to admin, http status 200.
- test_show_user_list_to_user() None ¶
Test display user list to logged-in user, http status 302.
- test_show_user_list_to_anonymous() None ¶
Test display user list to anonymous, http status 302.
- class TestUserDetailView(methodName='runTest')¶
Bases:
UserAuthTestCase
Test the user detail view.
- test_show_user_detail_to_user() None ¶
Test show user detail to owner, http status 200.
- test_show_user_detail_to_another_user() None ¶
Test permission to display the detail for another user.
- test_show_user_detail_to_anonymous() None ¶
Test permission to display the detail for anonymous.
Test the user authentication¶
Test auth user module.
- class TestAuthUser(methodName='runTest')¶
Bases:
UserAuthTestCase
Auth user test.
- test_login_get_method() None ¶
Test the http status of render the login form.
- test_login_post_method() None ¶
Test the http status of submit the login form.
- test_wrong_password_login() None ¶
Test the login with wrong password.
- test_logout() None ¶
Test logout.