Module ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call NameLoad ClassDef bases AttributeLoad NameLoad attr body Assign NameStore TupleLoad Str Assign NameStore Str decorator_list Expr Call AttributeLoad NameLoad attr NameLoad NameLoad ClassDef bases AttributeLoad NameLoad attr body Assign NameStore TupleLoad Str Assign NameStore Str decorator_list Expr Call AttributeLoad NameLoad attr NameLoad NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call NameLoad handlers ExceptHandler type NameLoad body Return NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str handlers ExceptHandler type NameLoad body Return NameLoad Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr keyword NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assert UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr Assert AttributeLoad AttributeLoad NameLoad attr attr With Call AttributeLoad NameLoad attr Num body For NameStore Call NameLoad Num body Assert UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr Num body For NameStore Call NameLoad Num body Assert UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr Num body For NameStore Call NameLoad Num body Assert UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore Call NameLoad Num body Assert UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr Num body For NameStore Call NameLoad Num body Assert UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore Call NameLoad Num body Assert UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword AttributeLoad NameLoad attr keyword NameLoad With Call AttributeLoad NameLoad attr Num body Assert Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr With Call AttributeLoad NameLoad attr Num body Assert Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad NameLoad Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad NameLoad Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A django.conf settings django.contrib.auth.models Permission DjangoPermission django.contrib.auth.models Group django.test TestCase django.contrib.contenttypes.models ContentType N/A authority authority permissions authority.models Permission authority.exceptions NotAModel UnsavedModelInstance authority.compat get_user_model authority.forms UserPermissionForm kitsune.users.tests UserFactory N/A User N/A get_user_model UserPermission N/A N/A permissions BasePermission N/A N/A checks N/A browse N/A label user_permission N/A N/A N/A N/A authority register User UserPermission GroupPermission N/A N/A permissions BasePermission N/A N/A checks N/A browse N/A label group_permission N/A N/A N/A N/A authority register Group GroupPermission DjangoPermissionChecksTestCase N/A TestCase N/A N/A 
    Django permission objects have certain methods that are always present,
    test those here.

    self.user will be given:
    - django permission add_user (test_add)
    - authority to delete_user which is him (test_delete)

    This permissions are given in the test case and not in the fixture, for
    later reference.
     setUp N/A N/A self N/A N/A N/A N/A self user N/A UserFactory N/A N/A self check N/A UserPermission N/A self user N/A test_no_permission N/A N/A self N/A N/A N/A N/A N/A self assertFalse N/A N/A N/A self check add_user N/A N/A N/A self assertFalse N/A N/A N/A self check delete_user N/A N/A N/A self assertFalse N/A N/A N/A self check delete_user N/A self user N/A test_add N/A N/A self N/A N/A N/A perm N/A N/A N/A DjangoPermission objects get codename add_user N/A N/A N/A N/A N/A self user user_permissions add perm N/A N/A N/A self assertTrue N/A N/A N/A self check add_user N/A test_delete N/A N/A self N/A N/A N/A perm N/A Permission user N/A self user content_object N/A self user codename user_permission.delete_user approved True N/A N/A N/A perm save N/A N/A N/A self assertFalse N/A N/A N/A self check delete_user N/A N/A N/A self assertTrue N/A N/A N/A self check delete_user N/A self user N/A N/A AssignBehaviourTest N/A TestCase N/A N/A 
    self.user will be given:
    - permission add_user (test_add),
    - permission delete_user for him (test_delete),
    - all existing codenames permissions: a/b/c/d (test_all),
     setUp N/A N/A self N/A N/A N/A N/A self user N/A UserFactory N/A N/A self check N/A UserPermission N/A self user N/A test_add N/A N/A self N/A N/A N/A result N/A N/A N/A self check assign check add_user N/A N/A N/A self assertTrue N/A isinstance N/A result N/A 0 DjangoPermission N/A N/A N/A self assertTrue N/A N/A N/A self check add_user N/A test_delete N/A N/A self N/A N/A N/A result N/A N/A N/A self check assign content_object N/A self user check delete_user N/A N/A N/A self assertTrue N/A isinstance N/A result N/A 0 Permission N/A N/A N/A self assertFalse N/A N/A N/A self check delete_user N/A N/A N/A self assertTrue N/A N/A N/A self check delete_user N/A self user N/A test_all N/A N/A self N/A N/A N/A result N/A N/A N/A self check assign content_object N/A self user N/A N/A N/A self assertTrue N/A isinstance result list N/A N/A N/A self assertTrue N/A N/A N/A self check browse_user N/A self user N/A N/A N/A self assertTrue N/A N/A N/A self check delete_user N/A self user N/A N/A N/A self assertTrue N/A N/A N/A self check add_user N/A self user N/A N/A N/A self assertTrue N/A N/A N/A self check change_user N/A self user N/A N/A GenericAssignBehaviourTest N/A TestCase N/A N/A 
    self.user will be given:
    - permission add (test_add),
    - permission delete for him (test_delete),
     setUp N/A N/A self N/A N/A N/A N/A self user N/A UserFactory N/A N/A self check N/A UserPermission N/A self user N/A test_add N/A N/A self N/A N/A N/A result N/A N/A N/A self check assign check add generic True N/A N/A N/A self assertTrue N/A isinstance N/A result N/A 0 DjangoPermission N/A N/A N/A self assertTrue N/A N/A N/A self check add_user N/A test_delete N/A N/A self N/A N/A N/A result N/A N/A N/A self check assign content_object N/A self user check delete generic True N/A N/A N/A self assertTrue N/A isinstance N/A result N/A 0 Permission N/A N/A N/A self assertFalse N/A N/A N/A self check delete_user N/A N/A N/A self assertTrue N/A N/A N/A self check delete_user N/A self user N/A N/A AssignExceptionsTest N/A TestCase N/A N/A 
    Tests that exceptions are thrown if assign() was called with inconsistent
    arguments.
     setUp N/A N/A self N/A N/A N/A N/A self user N/A UserFactory N/A N/A self check N/A UserPermission N/A self user N/A test_unsaved_model N/A N/A self N/A N/A N/A N/A N/A N/A N/A N/A self check assign content_object N/A User N/A N/A N/A UnsavedModelInstance N/A N/A True N/A N/A N/A self fail N/A test_not_model_content_object N/A N/A self N/A N/A N/A N/A N/A N/A N/A N/A self check assign content_object fail N/A N/A N/A NotAModel N/A N/A True N/A N/A N/A self fail N/A N/A SmartCachingTestCase N/A TestCase N/A N/A 
    The base test case for all tests that have to do with smart caching.
     setUp N/A N/A self N/A N/A N/A N/A self user N/A UserFactory N/A N/A self group N/A N/A N/A Group objects create N/A N/A N/A N/A N/A self group user_set add N/A self user N/A N/A self user_check N/A UserPermission user N/A self user N/A N/A self group_check N/A GroupPermission group N/A self group N/A N/A settings AUTHORITY_USE_SMART_CACHE True N/A tearDown N/A N/A self N/A N/A N/A N/A N/A N/A ContentType objects clear_cache N/A _old_user_permission_check N/A N/A self N/A N/A N/A N/A N/A N/A Permission objects user_permissions N/A self user foo N/A self user approved True check_groups True N/A _old_group_permission_check N/A N/A self N/A N/A N/A N/A N/A N/A Permission objects group_permissions N/A self group foo N/A self group approved True N/A N/A PerformanceTest N/A SmartCachingTestCase N/A N/A 
    Tests that permission are actually cached and that the number of queries
    stays constant.
     test_has_user_perms N/A N/A self N/A N/A N/A N/A N/A N/A self user is_superuser N/A N/A N/A self user is_active N/A N/A N/A self assertNumQueries 3 N/A N/A _ N/A range 5 N/A N/A N/A N/A N/A N/A self user_check has_user_perms foo N/A self user True False N/A test_group_has_perms N/A N/A self N/A N/A N/A N/A N/A self assertNumQueries 2 N/A N/A _ N/A range 5 N/A N/A N/A N/A N/A N/A self group_check has_group_perms foo N/A self group True N/A test_has_user_perms_check_group N/A N/A self N/A N/A N/A N/A N/A self assertNumQueries 3 N/A N/A N/A N/A N/A self user_check has_user_perms foo N/A self user approved True check_groups True N/A test_invalidate_user_permissions_cache N/A N/A self N/A N/A N/A N/A N/A self assertNumQueries 6 N/A N/A _ N/A range 5 N/A N/A N/A N/A N/A N/A self user_check has_user_perms foo N/A self user True False N/A N/A N/A N/A self user_check invalidate_permissions_cache N/A N/A N/A N/A ContentType objects clear_cache N/A _ N/A range 5 N/A N/A N/A N/A N/A N/A self user_check has_user_perms foo N/A self user True False N/A test_invalidate_group_permissions_cache N/A N/A self N/A N/A N/A N/A N/A self assertNumQueries 4 N/A N/A _ N/A range 5 N/A N/A N/A N/A N/A N/A self group_check has_group_perms foo N/A self group True N/A N/A N/A N/A self group_check invalidate_permissions_cache N/A N/A N/A N/A ContentType objects clear_cache N/A _ N/A range 5 N/A N/A N/A N/A N/A N/A self group_check has_group_perms foo N/A self group True N/A test_has_user_perms_check_group_multiple N/A N/A self N/A N/A N/A N/A N/A N/A Permission objects create content_type N/A N/A N/A Permission objects get_content_type User object_id N/A N/A self user pk codename foo group N/A self group approved True N/A N/A N/A self assertNumQueries 2 N/A N/A N/A N/A N/A self user_check has_user_perms foo N/A self user True True N/A new_group N/A N/A N/A Group objects create name new_group N/A N/A N/A N/A new_group user_set add N/A self user N/A N/A N/A N/A Permission objects create content_type N/A N/A N/A Permission objects get_content_type User object_id N/A N/A self user pk codename foo group new_group approved True N/A N/A N/A N/A self user_check invalidate_permissions_cache N/A N/A N/A self assertNumQueries 2 N/A N/A N/A N/A N/A self user_check has_user_perms foo N/A self user True True N/A N/A GroupPermissionCacheTestCase N/A SmartCachingTestCase N/A N/A 
    Tests that peg expected behaviour
     test_has_user_perms_with_groups N/A N/A self N/A N/A N/A perms N/A N/A self _old_user_permission_check N/A N/A N/A self assertEqual N/A N/A list perms N/A can_foo_with_group N/A N/A N/A self user_check has_user_perms foo N/A self user approved True check_groups True N/A N/A N/A self assertFalse can_foo_with_group N/A perm N/A N/A N/A Permission objects create content_type N/A N/A N/A Permission objects get_content_type User object_id N/A N/A self user pk codename foo group N/A self group approved True N/A perms N/A N/A self _old_user_permission_check N/A N/A N/A self assertEqual N/A perm N/A list perms N/A N/A N/A N/A self user_check invalidate_permissions_cache N/A can_foo_with_group N/A N/A N/A self user_check has_user_perms foo N/A self user approved True check_groups True N/A N/A N/A self assertTrue can_foo_with_group N/A test_has_group_perms_no_user N/A N/A self N/A N/A N/A can_foo_with_group N/A N/A N/A self group_check has_group_perms foo N/A self user approved True N/A N/A N/A self assertFalse can_foo_with_group N/A perms N/A N/A self _old_group_permission_check N/A N/A N/A self assertEqual N/A N/A list perms N/A perm N/A N/A N/A Permission objects create content_type N/A N/A N/A Permission objects get_content_type Group object_id N/A N/A self group pk codename foo group N/A self group approved True N/A perms N/A N/A self _old_group_permission_check N/A N/A N/A self assertEqual N/A perm N/A list perms N/A N/A N/A N/A self group_check invalidate_permissions_cache N/A can_foo_with_group N/A N/A N/A self group_check has_group_perms foo N/A self group approved True N/A N/A N/A self assertTrue can_foo_with_group N/A N/A