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

        class Model2PermOverride2(ModelRestApi):
            datamodel = SQLAInterface(Model2)
            method_permission_name = {
                "get_list": "read",
                "get": "read",
                "put": "write",
                "post": "write",
                "delete": "write",
                "info": "read",
            }

        self.model2permoverride2 = Model2PermOverride2
        self.appbuilder.add_api(Model2PermOverride2)

        role = self.appbuilder.sm.add_role("Test")
        pvm = self.appbuilder.sm.find_permission_view_menu(
            "can_read", "Model2PermOverride2"
        )
        self.appbuilder.sm.add_permission_role(role, pvm)
        user = self.appbuilder.sm.add_user(
            "test", "test", "user", "test@fab.org", role, "test"
        )
        if not user:
            user = self.appbuilder.sm.find_user("test")

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

        with model2_data(self.appbuilder.session, 1):
            uri = "api/v1/model2permoverride2/"
            rv = self.auth_client_get(client, token, uri)
            self.assertEqual(rv.status_code, 200)
            uri = "api/v1/model2permoverride2/_info"
            rv = self.auth_client_get(client, token, uri)
            self.assertEqual(rv.status_code, 200)
            uri = "api/v1/model2permoverride2/1"
            rv = self.auth_client_delete(client, token, uri)
            self.assertEqual(rv.status_code, 403)

        # Revert test data
        self.db.session.delete(user)
        self.db.session.commit()
        self.appbuilder.get_session.delete(self.appbuilder.sm.find_role("Test"))
        self.appbuilder.get_session.commit()

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