Skip to main content

Simple API testing with pytest

Project description

A pytest plugin for super simple API testing.

Using the api fixture

The api fixture, acts as a pass through to a requests.Session object, meaning you can make your API calls from it like so:

def test_my_get_function(api):
    response = api.get('/my-get-endpoint')
    assert response.status_code == 200

Anything you can usually do through requests.Session you can do through this fixture, but you only need to pass the url extension, meaning you can run these same tests on any running instance of your application.


  1. Add option to read base url from config.
  2. Tests.
  3. Add documentation.
  4. Add decorator to read mock from json file.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pytest-easy-api, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size pytest-easy-api-0.0.3.tar.gz (2.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page