Skip to main content

An HTTP API centric BDD style test framework

Project description

Expectly - An HTTP API centric BDD style test framework

|travis| |pypi| |docs|

Use Cases:

- Making assertions about api responses more readable
- Extending expectly with new assertions to reduce boilerplate


This library is in alpha. I will try my utmost to not make backwards incompatible changes
but it is possible that


.. code-block:: shell

$ pip install expectly

API Examples

Built In Assertion methods

.. code-block:: python

# status_code (with status code number)

# header (asserts the header exists). Sets the header value to be further tested against

# equals

# like (does a regex match against the value)

# exactly_like (does a regex match against the whole value

# encoding

# ok (uses requests.response.ok attribute)

Extending expectly.expect with additional assertions


JSON handling in expectly

jsonschema is used for evaluating whether json responses match the relevant schema
jmespath is used for navigating/selecting information to test inside of the json response


.. code-block:: shell

$ git clone
$ cd expectly
$ ./utils/manage clean
$ ./utils/manage test
$ ./utils/manage docs

1. All pull requests must pass the travis-ci builds
2. All pull requests should include inline (docstring) documentation, updates to built documentation if applicable,
and test coverage. This project aspires to be a 100% test coverage library.

.. |travis| image::
.. |pypi| image::
.. |docs| image::


- Initial Release

Hunter Senft-Grupp

Project details

Download files

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

Source Distribution

expectly-0.1.8.tar.gz (8.1 kB view hashes)

Uploaded source

Built Distribution

expectly-0.1.8-py2.py3-none-any.whl (7.0 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page