def test_api_page_delete_admin():
    """Can a user patch /api/v1/pages/<page_id> if admin"""
    app = create_ctfd()
    with app.app_context():
        gen_page(app.db, title="title", route="/route", content="content")
        with login_as_user(app, "admin") as client:
            r = client.delete("/api/v1/pages/2", json="")
            assert r.status_code == 200
            assert r.get_json().get("data") is None
    destroy_ctfd(app)
Can a user patch /api/v1/pages/<page_id> if admin
tests/api/v1/test_pages.py