

@raises(Exception)
def test_complex_sort_exception():
    (app, db, admin) = setup()
    (M1, M2) = create_models(db)
    view = CustomModelView(M2, db.session, endpoint='model2_3', column_sortable_list=[M1.test1])
    admin.add_view(view)
    sort_column = _._get_column_by_idx(0)[0]
    (_, data) = view.get_list(0, sort_column, False, None, None)
    eq_(len(data), 2)
    eq_(data[0].model1.test1, 'a')
    eq_(data[1].model1.test1, 'b')

dataset/ETHPy150Open flask-admin/flask-admin/flask_admin/tests/sqla/test_basic.py test_complex_sort_exception/VarMisuse@70/90 `view`->`_`