def test_api_update(self):
        """
        Validate that the api update endpoint updates [only] the fields in
        POST data
        """
        client = self.app.test_client()
        self.browser_login(client, USERNAME_ADMIN, PASSWORD_ADMIN)
        with model1_data(self.appbuilder.session, 1) as models:
            model_id = models[0].id
            item = self.db.session.query(Model1).get(model_id)
            field_integer_before = item.field_integer
            rv = client.put(
                f"/model1view/api/update/{model_id}",
                data=dict(field_string="zzz"),
                follow_redirects=True,
            )
            self.assertEqual(rv.status_code, 200)
            item = self.db.session.query(Model1).get(model_id)
            self.assertEqual(item.field_string, "zzz")
            self.assertEqual(item.field_integer, field_integer_before)

        Validate that the api update endpoint updates [only] the fields in
        POST data
        
tests/test_mvc.py