Module Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias identifier ImportFrom alias ImportFrom alias Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str ClassDef bases NameLoad body Expr Str Assign NameStore Dict Str Str Str Str Str Str Assign NameStore ListLoad Str Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Assign NameStore Str Assign NameStore Call NameLoad Call NameLoad keyword NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str Dict Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AugAssignSub AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword BinOpAdd AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr ListLoad SubscriptLoad AttributeLoad NameLoad attr Index Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr Str Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr CompareGt Call AttributeLoad Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr Str Num Expr Call AttributeLoad NameLoad attr CompareGt Call AttributeLoad Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr Str Num Expr Call AttributeLoad NameLoad attr CompareGt Call AttributeLoad Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr Str Num Expr Call AttributeLoad NameLoad attr CompareGt Call AttributeLoad Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr Str Num Expr Call AttributeLoad NameLoad attr CompareGt Call AttributeLoad Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr Str Num Expr Call AttributeLoad NameLoad attr CompareGt Call AttributeLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr Str Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr CompareGt Call AttributeLoad Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr Str Num Expr Call AttributeLoad NameLoad attr CompareGt Call AttributeLoad Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr Str Num Expr Call AttributeLoad NameLoad attr CompareGt Call AttributeLoad Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr Str Num Expr Call AttributeLoad NameLoad attr CompareGt Call AttributeLoad Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr Str Num Expr Call AttributeLoad NameLoad attr CompareGt Call AttributeLoad Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr Str Num Expr Call AttributeLoad NameLoad attr CompareGt Call AttributeLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr Str Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad Str Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpAdd Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Call NameLoad BinOpMod Str Dict Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpAdd Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Call NameLoad BinOpMod Str Dict Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A N/A datetime N/A hashlib N/A re django.contrib.auth get_user_model django.contrib.auth.models AnonymousUser django.core mail django.conf settings django.test TestCase django.utils.six text_type django.utils.six.moves.urllib_parse urlparse parse_qs userena.models UserenaSignup upload_to_mugshot userena settings userena_settings userena.tests.profiles.models Profile userena.utils get_user_profile N/A User N/A get_user_model N/A MUGSHOT_RE N/A N/A re compile ^[a-f0-9]{40}$ UserenaSignupModelTests N/A TestCase N/A N/A  Test the model of UserenaSignup  N/A user_info N/A username password email alice swordfish alice@example.com N/A fixtures N/A users profiles test_upload_mugshot N/A N/A self N/A N/A N/A 
        Test the uploaded path of mugshots

        TODO: What if a image get's uploaded with no extension?

         N/A user N/A N/A N/A User objects get pk 1 N/A filename my_avatar.png N/A path N/A upload_to_mugshot N/A get_user_profile user user filename N/A N/A N/A self assertNotEqual filename path N/A MUGSHOT_RE N/A N/A re compile N/A ^%(mugshot_path)s[a-f0-9]{10}.png$ N/A mugshot_path N/A userena_settings USERENA_MUGSHOT_PATH N/A N/A N/A self assertTrue N/A N/A MUGSHOT_RE search path N/A test_stringification N/A N/A self N/A N/A N/A 
        Test the stringification of a ``UserenaSignup`` object. A
        "human-readable" representation of an ``UserenaSignup`` object.

         N/A signup N/A N/A N/A UserenaSignup objects get pk 1 N/A N/A N/A self assertEqual N/A N/A signup __str__ N/A N/A signup user username N/A test_change_email N/A N/A self N/A N/A N/A  TODO  N/A N/A test_activation_expired_account N/A N/A self N/A N/A N/A 
        ``UserenaSignup.activation_key_expired()`` is ``True`` when the
        ``activation_key_created`` is more days ago than defined in
        ``USERENA_ACTIVATION_DAYS``.

         N/A user N/A N/A N/A UserenaSignup objects create_user N/A self user_info N/A N/A user date_joined N/A N/A datetime timedelta days N/A N/A userena_settings USERENA_ACTIVATION_DAYS 1 N/A N/A N/A user save N/A user N/A N/A N/A User objects get username alice N/A N/A N/A self assertTrue N/A N/A N/A user userena_signup activation_key_expired N/A test_activation_used_account N/A N/A self N/A N/A N/A 
        An user cannot be activated anymore once the activation key is
        already used.

         N/A user N/A N/A N/A UserenaSignup objects create_user N/A self user_info N/A activated_user N/A N/A N/A UserenaSignup objects activate_user N/A N/A user userena_signup activation_key N/A N/A N/A self assertTrue N/A N/A N/A activated_user userena_signup activation_key_expired N/A test_activation_unexpired_account N/A N/A self N/A N/A N/A 
        ``UserenaSignup.activation_key_expired()`` is ``False`` when the
        ``activation_key_created`` is within the defined timeframe.``

         N/A user N/A N/A N/A UserenaSignup objects create_user N/A self user_info N/A N/A N/A self assertFalse N/A N/A N/A user userena_signup activation_key_expired N/A test_activation_email N/A N/A self N/A N/A N/A 
        When a new account is created, a activation e-mail should be send out
        by ``UserenaSignup.send_activation_email``.

         N/A new_user N/A N/A N/A UserenaSignup objects create_user N/A self user_info N/A N/A N/A self assertEqual N/A len N/A mail outbox 1 N/A N/A N/A self assertEqual N/A N/A N/A mail outbox N/A 0 to N/A N/A N/A self user_info N/A email N/A test_plain_email N/A N/A self N/A N/A N/A 
        If HTML emails are disabled, check that outgoing emails are not multipart
         N/A N/A userena_settings USERENA_HTML_EMAIL False N/A new_user N/A N/A N/A UserenaSignup objects create_user N/A self user_info N/A N/A N/A self assertEqual N/A len N/A mail outbox 1 N/A N/A N/A self assertEqual N/A N/A N/A text_type N/A N/A N/A N/A mail outbox N/A 0 message find multipart/alternative -1 N/A test_html_email N/A N/A self N/A N/A N/A 
        If HTML emails are enabled, check outgoings emails are multipart and
        that different html and plain text templates are used
         N/A N/A userena_settings USERENA_HTML_EMAIL True N/A N/A userena_settings USERENA_USE_PLAIN_TEMPLATE True N/A new_user N/A N/A N/A UserenaSignup objects create_user N/A self user_info N/A N/A userena_settings USERENA_HTML_EMAIL False N/A N/A N/A self assertEqual N/A len N/A mail outbox 1 N/A N/A N/A self assertTrue N/A N/A N/A N/A text_type N/A N/A N/A N/A mail outbox N/A 0 message find multipart/alternative -1 N/A N/A N/A self assertTrue N/A N/A N/A N/A text_type N/A N/A N/A N/A mail outbox N/A 0 message find text/plain -1 N/A N/A N/A self assertTrue N/A N/A N/A N/A text_type N/A N/A N/A N/A mail outbox N/A 0 message find text/html -1 N/A N/A N/A self assertTrue N/A N/A N/A N/A text_type N/A N/A N/A N/A mail outbox N/A 0 message find <html> -1 N/A N/A N/A self assertTrue N/A N/A N/A N/A text_type N/A N/A N/A N/A mail outbox N/A 0 message find <p>Thank you for signing up -1 N/A N/A N/A self assertFalse N/A N/A N/A N/A N/A N/A mail outbox N/A 0 body find <p>Thank you for signing up -1 N/A test_generated_plain_email N/A N/A self N/A N/A N/A 
        If HTML emails are enabled and plain text template are disabled,
        check outgoings emails are multipart and that plain text is generated
        from html body
         N/A N/A userena_settings USERENA_HTML_EMAIL True N/A N/A userena_settings USERENA_USE_PLAIN_TEMPLATE False N/A new_user N/A N/A N/A UserenaSignup objects create_user N/A self user_info N/A N/A userena_settings USERENA_HTML_EMAIL False N/A N/A userena_settings USERENA_USE_PLAIN_TEMPLATE True N/A N/A N/A self assertEqual N/A len N/A mail outbox 1 N/A N/A N/A self assertTrue N/A N/A N/A N/A text_type N/A N/A N/A N/A mail outbox N/A 0 message find multipart/alternative -1 N/A N/A N/A self assertTrue N/A N/A N/A N/A text_type N/A N/A N/A N/A mail outbox N/A 0 message find text/plain -1 N/A N/A N/A self assertTrue N/A N/A N/A N/A text_type N/A N/A N/A N/A mail outbox N/A 0 message find text/html -1 N/A N/A N/A self assertTrue N/A N/A N/A N/A text_type N/A N/A N/A N/A mail outbox N/A 0 message find <html> -1 N/A N/A N/A self assertTrue N/A N/A N/A N/A text_type N/A N/A N/A N/A mail outbox N/A 0 message find <p>Thank you for signing up -1 N/A N/A N/A self assertTrue N/A N/A N/A N/A N/A N/A mail outbox N/A 0 body find Thank you for signing up -1 N/A N/A BaseProfileModelTest N/A TestCase N/A N/A  Test the ``BaseProfile`` model  N/A fixtures N/A users profiles test_mugshot_url N/A N/A self N/A N/A N/A  The user has uploaded it's own mugshot. This should be returned.  N/A profile N/A N/A N/A Profile objects get pk 1 N/A N/A profile mugshot fake_image.png N/A N/A N/A profile save N/A profile N/A N/A N/A Profile objects get pk 1 N/A N/A N/A self assertEqual N/A N/A profile get_mugshot_url N/A N/A settings MEDIA_URL fake_image.png N/A test_stringification N/A N/A self N/A N/A N/A  Profile should return a human-readable name as an object  N/A profile N/A N/A N/A Profile objects get pk 1 N/A N/A N/A self assertEqual N/A N/A profile __str__ N/A Profile of %s N/A N/A profile user username N/A test_get_mugshot_url_without_gravatar N/A N/A self N/A N/A N/A 
        Test if the correct mugshot is returned for the user when
        ``USERENA_MUGSHOT_GRAVATAR`` is set to ``False``.

         N/A N/A userena_settings USERENA_MUGSHOT_GRAVATAR False N/A profile N/A N/A N/A Profile objects get pk 1 N/A N/A N/A self assertEqual N/A N/A profile get_mugshot_url None N/A N/A userena_settings USERENA_MUGSHOT_DEFAULT http://example.com N/A profile N/A N/A N/A Profile objects get pk 1 N/A N/A N/A self assertEqual N/A N/A profile get_mugshot_url http://example.com N/A N/A userena_settings USERENA_MUGSHOT_GRAVATAR True N/A test_get_mugshot_url_with_gravatar N/A N/A self N/A N/A N/A 
        Test if the correct mugshot is returned when the user makes use of gravatar.

         N/A profile N/A N/A N/A Profile objects get pk 1 N/A gravatar_hash N/A N/A N/A N/A hashlib md5 N/A N/A N/A N/A profile user email encode utf-8 hexdigest N/A mugshot_url N/A N/A profile get_mugshot_url N/A parsed N/A urlparse mugshot_url N/A N/A N/A self assertEqual N/A parsed netloc www.gravatar.com N/A N/A N/A self assertEqual N/A parsed path N/A /avatar/ gravatar_hash N/A N/A N/A self assertEqual N/A parse_qs N/A parsed query N/A parse_qs N/A s=%(size)s&d=%(default)s N/A size default N/A userena_settings USERENA_MUGSHOT_SIZE N/A userena_settings USERENA_MUGSHOT_DEFAULT N/A N/A userena_settings USERENA_MUGSHOT_SIZE 180 N/A N/A userena_settings USERENA_MUGSHOT_DEFAULT 404 N/A mugshot_url N/A N/A profile get_mugshot_url N/A parsed N/A urlparse mugshot_url N/A N/A N/A self assertEqual N/A parsed netloc www.gravatar.com N/A N/A N/A self assertEqual N/A parsed path N/A /avatar/ gravatar_hash N/A N/A N/A self assertEqual N/A parse_qs N/A parsed query N/A parse_qs N/A s=%(size)s&d=%(default)s N/A size default N/A userena_settings USERENA_MUGSHOT_SIZE N/A userena_settings USERENA_MUGSHOT_DEFAULT N/A N/A userena_settings USERENA_MUGSHOT_SIZE 80 N/A N/A userena_settings USERENA_MUGSHOT_DEFAULT identicon N/A test_get_full_name_or_username N/A N/A self N/A N/A N/A  Test if the full name or username are returned correcly  N/A user N/A N/A N/A User objects get pk 1 N/A profile N/A get_user_profile user user N/A full_name N/A N/A profile get_full_name_or_username N/A N/A N/A self assertEqual full_name John Doe N/A N/A user first_name N/A N/A user last_name N/A N/A N/A user save N/A N/A N/A self assertEqual N/A N/A profile get_full_name_or_username john N/A N/A userena_settings USERENA_WITHOUT_USERNAMES True N/A N/A N/A self assertEqual N/A N/A profile get_full_name_or_username john@example.com N/A N/A userena_settings USERENA_WITHOUT_USERNAMES False N/A test_can_view_profile N/A N/A self N/A N/A N/A  Test if the user can see the profile with three type of users.  N/A anon_user N/A AnonymousUser N/A super_user N/A N/A N/A User objects get pk 1 N/A reg_user N/A N/A N/A User objects get pk 2 N/A profile N/A N/A N/A Profile objects get pk 1 N/A N/A profile privacy open N/A N/A N/A self assertTrue N/A N/A profile can_view_profile anon_user N/A N/A N/A self assertTrue N/A N/A profile can_view_profile super_user N/A N/A N/A self assertTrue N/A N/A profile can_view_profile reg_user N/A N/A profile privacy registered N/A N/A N/A self assertFalse N/A N/A profile can_view_profile anon_user N/A N/A N/A self assertTrue N/A N/A profile can_view_profile super_user N/A N/A N/A self assertTrue N/A N/A profile can_view_profile reg_user N/A N/A profile privacy closed N/A N/A N/A self assertFalse N/A N/A profile can_view_profile anon_user N/A N/A N/A self assertTrue N/A N/A profile can_view_profile super_user N/A N/A N/A self assertFalse N/A N/A profile can_view_profile reg_user N/A N/A