

def test_permissions():
    app = Flask(__name__)
    admin = base.Admin(app)
    view = MockView()
    admin.add_view(view)
    client = admin.test_client()
    view.allow_access = False
    rv = client.get('/admin/mockview/')
    eq_(rv.status_code, 403)

dataset/ETHPy150Open mrjoes/flask-admin/flask_admin/tests/test_base.py test_permissions/VarMisuse@40/45 `app`->`admin`