

def setUp(self):
    super(AdminActionsTests, self).setUp()
    u = User.objects.get(username='normaluser')
    u.is_staff = True
    perms = Permission.objects.filter(content_type__app_label='comments', codename__endswith='comment')
    for perm in perms:
        u.user_permissions.add(perm)
    u.save()

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/tests/regressiontests/comment_tests/tests/moderation_view_tests.py AdminActionsTests.setUp/original