def test_check_permissions(self):
        # Create a new account.
        user = UserenaSignup.objects.create_user(**self.user_info)
        user.save()

        # Remove all permissions
        UserObjectPermission.objects.filter(user=user).delete()
        self.failUnlessEqual(UserObjectPermission.objects.filter(user=user).count(),
                             0)

        # Check it
        call_command('check_permissions')

        # User should have all permissions again
        user_permissions = UserObjectPermission.objects.filter(user=user).values_list('permission__codename', flat=True)

        required_permissions = [u'change_user', u'delete_user', u'change_profile', u'view_profile']
        for perm in required_permissions:
            if user_permissions not in perm:
                self.fail()

        # Check it again should do nothing
        call_command('check_permissions', test=True)
dataset/ETHPy150Open clione/django-kanban/src/core/userena/tests/commands.py/CheckPermissionTests.test_check_permissions/swapped operands of `not in`