

def test_admin_customizations():
    app = Flask(__name__)
    admin = base.Admin(app, name='Test', url='/foobar', static_url_path='/static/my/admin')
    eq_(admin.name, 'Test')
    eq_(admin.url, '/foobar')
    eq_(admin.index_view.blueprint.static_url_path, '/static/my/admin')
    client = app.test_client()
    rv = client.get('/foobar/')
    eq_(rv.status_code, 200)
    with app.test_request_context('/'):
        rv = client.get(url_for('admin.static', filename='bootstrap/bootstrap2/css/bootstrap.css'))
    eq_(rv.status_code, 200)

dataset/ETHPy150Open mrjoes/flask-admin/flask_admin/tests/test_base.py test_admin_customizations/original