Loading...
QUIZ

Certification Test

 
Que No. 1 ) What is the purpose of the @app.teardown_request decorator in Flask?

A.) To configure SSL certificates
B.) To define routes
C.) To execute a function after each request, even if an exception occurred during processing
D.) To serve static files


Que No. 2 ) Which Flask extension is commonly used for handling user authentication and authorization?

A.) flask-auth
B.) flask-login
C.) flask-oauth
D.) auth-handler


Que No. 3 ) How can you access query parameters in a Flask route handler?

A.) Using the request.params object
B.) Using the request.query object
C.) Using the request.args object
D.) Using the request.parameters object


Que No. 4 ) What is the purpose of the @app.errorhandler(404) decorator in Flask?

A.) To define a custom error page for 404 errors
B.) To configure SSL certificates
C.) To define a custom error page for all errors
D.) To serve static files


Que No. 5 ) What is Flask's built-in mechanism for handling cross-origin resource sharing (CORS)?

A.) flask-cors
B.) cors-handler
C.) cross-origin-middleware
D.) flask-cross-origin


Que No. 6 ) What is the role of the g object in Flask?

A.) To manage the Flask application's state
B.) To serve static files
C.) To configure server settings
D.) To store data for the duration of a request


Que No. 7 ) Which Flask extension is commonly used for handling database migrations?

A.) flask-migrate
B.) flask-db-utils
C.) flask-sqlalchemy
D.) db-migrate


Que No. 8 ) What is the purpose of the @app.cli.command() decorator in Flask?

A.) To configure SSL certificates
B.) To define routes
C.) To create custom CLI commands for Flask applications
D.) To serve static files


Que No. 9 ) What is Flask's built-in mechanism for testing applications?

A.) flask-test
B.) unittest
C.) pytest
D.) Flask does not support testing


Que No. 10 ) What is the Flask-SocketIO extension used for?

A.) Handling file uploads
B.) Adding WebSocket support to Flask applications
C.) Managing authentication
D.) Serving static files