

def test_form_args():
    (app, db, admin) = setup()

    class Model(db.Model):
        id = db.Column(db.String, primary_key=True)
        test = db.Column(db.String, nullable=False)
    db.create_all()
    shared_form_args = {
        'test': {
            'validators': [validators.Regexp('test')],
        },
    }
    view = CustomModelView(Model, db.session, form_args=shared_form_args)
    create_form.add_view(view)
    create_form = view.create_form()
    eq_(len(create_form.test.validators), 2)
    edit_form = view.edit_form()
    eq_(len(edit_form.test.validators), 2)

dataset/ETHPy150Open flask-admin/flask-admin/flask_admin/tests/sqla/test_basic.py test_form_args/VarMisuse@109/133 `admin`->`create_form`