def METHOD_NAME(self):
    permission = Permission.objects.get_by_natural_key(
        app_label="tests",
        model="testgenericsetting",
        codename="change_testgenericsetting",
    )
    for fn in hooks.get_hooks("register_permissions"):
        if permission in fn():
            break
    else:
        self.fail("Change permission for tests.TestGenericSetting not registered")