Metadata-Version: 2.0
Name: bddrest
Version: 0.3.1a1.dev4
Summary: A toolchain for testing REST APIs in BDD manner.
Home-page: https://github.com/Carrene/bddrest
Author: Vahid Mardani
Author-email: vahid.mardani@gmail.com
License: MIT
Description-Content-Type: UNKNOWN
Platform: UNKNOWN
Classifier: Environment :: Console
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Development Status :: 1 - Planning
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: webtest
Requires-Dist: pyyaml

# bddrest

Toolchain to define and verify REST API in BDD.


## Quick start


```python

from bddrest import given, when, then, and_, response


with given(
        wsgi_application,
        title='Quickstart!',
        url='/books/id: 1',
        as_='visitor'):

    then(response.status == '200 OK')
    and_('foo' in response.json)
    and_(response.json['foo'] == 'bar')

    when(
        'Trying invalid book id',
        url_parameters={'id': None}
    )

    then(response.status_code == 404)


```


