def test_concrete_table_inheritance():
    # Test multiple primary keys - mix int and string together
    app, db, admin = setup()

    class Parent(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        test = db.Column(db.String)

    class Child(Parent):
        __mapper_args__ = {'concrete': True}
        id = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.String(100))
        test = db.Column(db.String)

    db.create_all()

    view = CustomModelView(Child, db.session, form_columns=['id', 'test', 'name'])
    admin.add_view(view)

    client = app.test_client()

    rv = client.get('/admin/child/')
    eq_(rv.status_code, 200)

    rv = client.post('/admin/child/new/',
                     data=dict(id=1, test='foo', name='bar'))
    eq_(rv.status_code, 302)

    rv = client.get('/admin/child/edit/?id=1')
    eq_(rv.status_code, 200)
    data = rv.data.decode('utf-8')
    ok_('foo' in data)
    ok_('bar' in data)
dataset/ETHPy150Open flask-admin/flask-admin/flask_admin/tests/sqla/test_multi_pk.py/test_concrete_table_inheritance/original