websauna.tests.user.test_user module

Test user model and mixin.

websauna.tests.user.test_user.new_group(dbsession)[source]

Create a new groups and return it for testing.

websauna.tests.user.test_user.new_user(dbsession, new_group)[source]

Create a new user and return it for testing.

websauna.tests.user.test_user.test_can_login(new_user)[source]

Test if user can login.

User needs to be enabled and activated.

websauna.tests.user.test_user.test_cannot_login_if_not_enable(new_user)[source]

Test if setting enabled to false blocks user from login.

websauna.tests.user.test_user.test_friendly_name_with_email_fallback(new_user)[source]

Test friendly_name property that will return the user email as fallback.

websauna.tests.user.test_user.test_friendly_name_with_full_name(new_user)[source]

Test friendly_name property that should return the full_name, if available.

websauna.tests.user.test_user.test_friendly_name_with_username(new_user)[source]

Test friendly_name property that should return the username, if available.

websauna.tests.user.test_user.test_generate_username(new_user)[source]

Test generate_username method.

websauna.tests.user.test_user.test_is_activated(new_user)[source]

Test if user is activated (completed the email activation).

websauna.tests.user.test_user.test_user_creation(new_user)[source]

Load the default user models and see we create corresponding tables right.

websauna.tests.user.test_user.test_user_is_admin(dbsession, new_user)[source]

Test if user is an admin.

websauna.tests.user.test_user.test_user_is_in_group(dbsession, new_user)[source]

Test if user is in a group.