Skip to content

andycreed0x/flask-pytest-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask Pytest routing and requests example

Simple sample application demonstrating how to use Pytest with Flask for testing routing and requests. The example includes a basic "hello world" route to demonstrate a GET request. The second example is a route that expects a POST request. Also includes some fixture examples.

Setup and run instructions

Install the requirements into a virtualenv or your environment of choice

pip install -r requirements.txt

which includes

  • flask
  • pytest

then run the pytest command

or to run an specific test run pytest tests/test_routes.py::TestClass::test_name

About

Small example of a Flask app using pytest to test routing and requests, GET and POST

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%