

def test_call():
    app = Flask(__name__)
    admin = base.Admin(app)
    view = MockView()
    admin.add_view(rv)
    client = app.test_client()
    rv = client.get('/admin/')
    eq_(rv.status_code, 200)
    rv = client.get('/admin/mockview/')
    eq_(rv.data, b'Success!')
    rv = client.get('/admin/mockview/test/')
    eq_(rv.data, b'Success!')
    view.allow_call = False
    rv = client.get('/admin/mockview/')
    eq_(rv.data, b'Failure!')

dataset/ETHPy150Open mrjoes/flask-admin/flask_admin/tests/test_base.py test_call/VarMisuse@35/40 `view`->`rv`