def test_model_add_required_validation(self):
        """
        Test Model add required fields validation
        """
        client = self.app.test_client()
        self.browser_login(client, USERNAME_ADMIN, PASSWORD_ADMIN)

        with model1_data(self.appbuilder.session, 2):
            # Test field required
            rv = client.post(
                "/model1view/add",
                data=dict(field_string="", field_integer="1"),
                follow_redirects=True,
            )
            self.assertEqual(rv.status_code, 200)
            data = rv.data.decode("utf-8")
            self.assertIn(NOTNULL_VALIDATION_STRING, data)

            model = self.db.session.query(Model1).all()
            self.assertEqual(len(model), 2)

        Test Model add required fields validation
        
tests/test_mvc.py