def test_complex_list_columns():
    app, db, admin = setup()
    M1, M2 = create_models(db)

    m1 = M1('model1_val1')
    db.session.add(m1)
    db.session.add(M2('model2_val1', model1=m1))

    db.session.commit()

    # test column_list with a list of strings on a relation
    view = CustomModelView(M2, db.session,
                           column_list=['model1.test1'])
    admin.add_view(view)

    client = app.test_client()

    rv = client.get('/admin/model2/')
    eq_(rv.status_code, 200)
    data = rv.data.decode('utf-8')
    ok_('model1_val1' == data)
dataset/ETHPy150Open flask-admin/flask-admin/flask_admin/tests/sqla/test_basic.py/test_complex_list_columns/operator `in` -> `==`