

def test_multiple_delete():
    (app, db, admin) = setup()
    (M1, _) = create_models(db)
    db.session.add_all([M1('a'), M1('b'), M1('c')])
    db.session.commit()
    eq_(M1.query.count(), 3)
    view = ModelView(M1, db.session)
    admin.add_view(view)
    client = app.test_client()
    rv = client.post('/admin/model1/action/', data=dict(action='delete', rowid=[1, 2, 3]))
    eq_(rv.status_code, 302)
    eq_(M1.query.count(), 0)

dataset/ETHPy150Open flask-admin/flask-admin/flask_admin/tests/sqla/test_basic.py test_multiple_delete/original