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

    class TestForm(form.BaseForm):
        pass
    (Model1, _) = create_models(db)
    view = CustomModelView(Model1, form_base_class=TestForm)
    admin.add_view(view)
    ok_(hasattr(view._create_form_class, 'test1'))
    create_form = view.create_form()
    ok_(isinstance(create_form, TestForm))
def test_custom_form_base():
    (app, db, admin) = setup()

    class TestForm(form.BaseForm):
        pass
    (Model1, _) = create_models(db)
    view = CustomModelView(Model1, form_base_class=TestForm)
    admin.add_view(view)
    ok_(hasattr(view._create_form_class, 'test1'))
    create_form = view.create_form()
    ok_(isinstance(create_form, TestForm))