def test_edit_add_form_action_prefix_for_compactCRUDMixin(self):
        """
        Test form_action in add, form_action in edit (CompactCRUDMixin)
        """
        client = self.app.test_client()
        self.browser_login(client, USERNAME_ADMIN, PASSWORD_ADMIN)

        # Make sure we have something to edit.
        prefix = "/some-prefix"
        base_url = "http://localhost" + prefix
        session_form_action_key = "Model1CompactView__session_form_action"

        with model1_data(self.appbuilder.session, 1) as models:
            model_id = models[0].id
            with client as c:
                expected_form_action = prefix + "/model1compactview/add/?"

                c.get("/model1compactview/add/", base_url=base_url)
                self.assertEqual(session[session_form_action_key], expected_form_action)

                expected_form_action = f"{prefix}/model1compactview/edit/{model_id}?"
                c.get(f"/model1compactview/edit/{model_id}", base_url=base_url)

                self.assertEqual(session[session_form_action_key], expected_form_action)

        Test form_action in add, form_action in edit (CompactCRUDMixin)
        
tests/test_mvc.py