In this lab, you'll convert your OOP text-based adventure game into a web application. The goal will be to practice working with Flask to create a server capable of handling requests and building responses. You will also work on your Test-Driven Development process.
The initial setup will require you to sign up for a free Heroku account. Heroku is a Platform as a Service (PaaS) meaning it's a web service that helps you manage servers that can run your applications built in Python and other languages.
If you need help writing your own tests, please review the Automated Testing lab from a few weeks before. Also, re-read the Flask Tutorial page on Test Coverage to review using pytest
and coverage
for a Flask application. Finally, you should keep Pytest's documentation open as a reference.
flask
and pytest
.Make sure that the project setup for a simple app is working before you start developing your game! Adding more code on to a broken setup is going to make debugging it that much harder. If you see the app running on a Heroku URL and can make quick changes to it, then you are good to go!
Optional, but recommended: