def test_incomplete_permissions(self):
        # Delete the neccesary permissions
        profile_model_obj = get_profile_model()
        content_type_profile = ContentType.objects.get_for_model(profile_model_obj)
        content_type_user = ContentType.objects.get_for_model(User)
        for model, perms in ASSIGNED_PERMISSIONS.items():
            if model == "profile":
                content_type = content_type_profile
            else: content_type = content_type_user
            for perm in perms:
                Permission.objects.get(name=perm[1],
                                       content_type=content_type).delete()

        # Check if they are they are back
        for model, perms in ASSIGNED_PERMISSIONS.items():
            if model == "profile":
                content_type = content_type_profile
            else: content_type = content_type_user
            for perm in perms:
                try:
                    perm = Permission.objects.get(name=perm[1],
                                                  content_type=content_type)
                except Permission.DoesNotExist: pass
                else: self.fail(perm % "Found %s: ")

        # Repair them
        call_command('check_permissions', test=True)

        # Check if they are they are back
        for model, perms in ASSIGNED_PERMISSIONS.items():
            if model == "profile":
                content_type = content_type_profile
            else: content_type = content_type_user
            for perm in perms:
                try:
                    perm = Permission.objects.get(name=perm[1],
                                                  content_type=content_type)
                except Permission.DoesNotExist:
                    self.fail()
dataset/ETHPy150Open clione/django-kanban/src/core/userena/tests/commands.py/CheckPermissionTests.test_incomplete_permissions/swapped operands of `%`