def test_class_method_permission_override(self):
        """
        REST Api: Test class method permission name override
        """

        class Model2PermOverride1(ModelRestApi):
            datamodel = SQLAInterface(Model2)
            class_permission_name = "api"
            method_permission_name = {
                "get_list": "access",
                "get": "access",
                "put": "access",
                "post": "access",
                "delete": "access",
                "info": "access",
            }

        self.model2permoverride1 = Model2PermOverride1
        self.appbuilder.add_api(Model2PermOverride1)

        role = self.appbuilder.sm.add_role("Test")
        pvm = self.appbuilder.sm.find_permission_view_menu("can_access", "api")
        self.appbuilder.sm.add_permission_role(role, pvm)
        self.appbuilder.sm.add_user(
            "test", "test", "user", "test@fab.org", role, "test"
        )

        client = self.app.test_client()
        token = self.login(client, "test", "test")

        with model2_data(self.appbuilder.session, 1) as models:
            model_id = models[0].id
            uri = "api/v1/model2permoverride1/"
            rv = self.auth_client_get(client, token, uri)
            self.assertEqual(rv.status_code, 200)
            uri = "api/v1/model2permoverride1/_info"
            rv = self.auth_client_get(client, token, uri)
            self.assertEqual(rv.status_code, 200)
            uri = f"api/v1/model2permoverride1/{model_id}"
            rv = self.auth_client_delete(client, token, uri)
            self.assertEqual(rv.status_code, 200)

        REST Api: Test class method permission name override
        
tests/test_api.py