def test_model_delete_integrity(self):
        """
        Test Model CRUD delete integrity validation
        """
        # SQLLite does not support constraints by default
        engine_type = self.appbuilder.get_session.bind.dialect.name
        if engine_type == "sqlite":
            return

        client = self.app.test_client()
        self.browser_login(client, USERNAME_ADMIN, PASSWORD_ADMIN)

        with model2_data(self.appbuilder.session, 2):
            model1 = (
                self.appbuilder.get_session.query(Model1)
                .filter_by(field_string="test1")
                .one_or_none()
            )
            pk = model1.id
            rv = client.get(f"/model1view/delete/{pk}", follow_redirects=True)

            self.assertEqual(rv.status_code, 200)
            model = self.db.session.query(Model1).filter_by(id=pk).one_or_none()
            self.assertNotEqual(model, None)

        Test Model CRUD delete integrity validation
        
tests/test_mvc.py