Question 18
Consider the following flask app. Given that test_request_context() allows text to be printed on the terminal, which of the following statements is/are correct?
from flask import Flask, url_forapp = Flask(__name__)
@app.route('/products')def products(): return 'Product List'
@app.route('/product/<int:product_id>/<string:name>')def product_detail(product_id, name): return f'Product ID: {product_id}, Name: {name}'
with app.test_request_context(): #== print statement ==#