Users Tests

class tests.users.factories.ActivationCodeFactory(**kwargs)[source]

Bases: DjangoModelFactory

code = <factory.declarations.Sequence object>
email = Maybe(<SelfAttribute('include_email', default=None)>, yes=<factory.declarations.LazyAttribute object>, no='')
expiration_date = <factory.declarations.LazyAttribute object>
uid = <factory.declarations.LazyAttribute object>
user = <factory.declarations.SubFactory object>
class tests.users.factories.CategoryFactory(**kwargs)[source]

Bases: DjangoModelFactory

name = <factory.declarations.LazyAttribute object>
class tests.users.factories.ProfileFactory(**kwargs)[source]

Bases: DjangoModelFactory

avatar = <factory.django.ImageField object>
birthdate = <factory.declarations.LazyAttribute object>
user: User = <factory.declarations.SubFactory object>
class tests.users.factories.UserFactory(**kwargs)[source]

Bases: DjangoModelFactory

email = <factory.declarations.LazyAttribute object>
is_active = True
password = <factory.declarations.PostGenerationMethodCall object>
username = <factory.declarations.LazyAttribute object>
class tests.users.test_api.ExportDataTests(methodName='runTest')[source]

Bases: APITransactionTestCase

setUp()[source]

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

test_export_data()[source]
class tests.users.test_api.FollowTestCase(methodName='runTest')[source]

Bases: APITestCase

setUp()[source]

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

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test_auth_following()[source]
test_error_following_already_followed_user()[source]
test_error_unfollowing_unfollowed_user()[source]
test_list_followers()[source]
test_list_followers_other_user()[source]
test_list_following()[source]
test_list_following_other_user()[source]
test_pagination()[source]
test_pagination_following()[source]
test_pagination_with_search_following()[source]
test_search_following()[source]
test_successful_follow()[source]
test_successful_unfollow()[source]
test_users_following_field()[source]
test_users_likes_followers_following_quantity()[source]
class tests.users.test_api.UserSignUpTests(methodName='runTest')[source]

Bases: APITestCase

interests: List[Category] = []
classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

test_change_password_signup_password_check()[source]
test_list_of_users()[source]
test_reset_password_check_password()[source]
test_successful_activation()[source]
test_successful_change_email()[source]
test_successful_change_password_signup()[source]
test_successful_delete_user()[source]
test_successful_delete_user_and_signup()[source]
test_successful_reset_password()[source]
test_successful_signup()[source]
test_wrong_signup_different_passwords()[source]
test_wrong_signup_missing_fields()[source]
test_wrong_signup_wrong_file_format()[source]
test_wrong_token()[source]
test_wrong_token_expired()[source]
test_wrong_uid()[source]
tests_check_age_valid()[source]
tests_check_fields()[source]
tests_check_min_age()[source]
tests_check_password()[source]
tests_successful_user_flow()[source]
tests_successful_user_flow_json()[source]
class tests.users.test_services.FollowersServiceTestCase(methodName='runTest')[source]

Bases: TestCase

setUp()[source]

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

test_follow()[source]

Checking that user1 is now following user2

test_follow_already_following()[source]

Checking for AlreadyFollowingUserException

test_unfollow()[source]

Checking that user1 is no longer following user2

test_unfollow_not_following()[source]

Checking for NotFollowingUserException

class tests.users.test_services.TestUnauthorizedUserService(methodName='runTest')[source]

Bases: TestCase

test_create_user()[source]
class tests.users.test_services.TestUsersService(methodName='runTest')[source]

Bases: TestCase

setUp()[source]

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

test_activate_user()[source]
test_confirm_email()[source]
test_confirm_password()[source]
test_delete()[source]
test_set_email()[source]
test_set_password()[source]
class tests.users.test_urls.UserURLsTestCase(methodName='runTest')[source]

Bases: TestCase

classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

test_categories_urls_list()[source]
test_export_data_url()[source]
test_follow_url()[source]
test_followers_list_url()[source]
test_following_list_url()[source]
test_unfollow_url()[source]
test_user_followers_list_url()[source]
test_user_following_list_url()[source]
test_user_password_change()[source]
test_user_unuauthorized_urls_list()[source]
test_user_unuauthorized_urls_resend_activation_code()[source]
test_user_urls_delete()[source]
test_user_urls_get()[source]
test_user_urls_patch()[source]
test_user_urls_put()[source]
test_user_urls_retrieve()[source]
class tests.users.test_serializers.TestAuthorCommentSerializer(methodName='runTest')[source]

Bases: TestCase

Test author comment serializer

setUp() None[source]

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

test_data()[source]
class tests.users.test_serializers.TestInterestsSerializer(methodName='runTest')[source]

Bases: TestCase

test_create_interest()[source]
test_invalid_data()[source]
test_valid_serializer()[source]
class tests.users.test_serializers.TestSenderNotificationSerializer(methodName='runTest')[source]

Bases: TestCase

Test sender notification serializer

setUp() None[source]

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

test_data()[source]
class tests.users.test_serializers.TestUserSerializer(methodName='runTest')[source]

Bases: TestCase

test_dynamic_profile_fields()[source]
test_expected_fields()[source]
test_includes_all_profile_fields()[source]
test_invalid_password_repeat()[source]
test_valid_serializer()[source]