semvec/pypi-packages huggingface dataset:
pytest-whirlwind 0.1.0
Testing Tornado.
License: MIT
Requires Python: >=3.6,<4
Keywords: tornado,pytest

pytest-whirlwind
################

.. image:: https://travis-ci.org/supakeen/pytest-whirlwind.svg?branch=master
    :target: https://travis-ci.org/supakeen/pytest-whirlwind

.. image:: https://readthedocs.org/projects/pytest-whirlwind/badge/?version=latest
    :target: https://pytest-whirlwind.readthedocs.io/en/latest/

.. image:: https://pytest-whirlwind.readthedocs.io/en/latest/_static/license.svg
    :target: https://github.com/supakeen/pytest-whirlwind/blob/master/LICENSE

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/ambv/black

.. image:: https://img.shields.io/pypi/v/pytest-whirlwind
    :target: https://pypi.org/project/pytest-whirlwind

.. image:: https://codecov.io/gh/supakeen/pytest-whirlwind/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/supakeen/pytest-whirlwind
bravado-django-test-client 1.0.1
Bravado Django Test Client
License: MIT

# Bravado Django Test Client

[![Build Status](https://travis-ci.org/maximilianhurl/bravado-django-test-client.svg?branch=master)](https://travis-ci.org/maximilianhurl/bravado-django-test-client)

[Django Test Client](https://docs.djangoproject.com/en/2.1/topics/testing/tools/\#the-test-client) compatible HTTP Client with [Bravado](https://github.com/Yelp/bravado).

This allows your Django API and OpenAPI v2 (Swagger) specification files to be tested against each other in your unit tests. The aim being to quickly highlight any potential discrepancies between the specification and your actual API.

## Basic Usage

```python
from bravado.client import SwaggerClient
from bravado.swagger_model import load_file
from bravado_django_test_client.django_test_client import DjangoTestHttpClient
from bravado_django_test_client.config import config
from rest_framework.test import APIClient


swagger_file = load_file("schema.yaml")

test_client = APIClient()  # or the standard django test client

bravado_http_client = DjangoTestHttpClient(test_client)

client = SwaggerClient.from_spec(swagger_file, http_client=bravado_http_client, config=config)

# now use as you would a normal bravado client
pet_result = client.pet.getPetById(petId=42).response().result

# any request or response that doesnt match your schema will raise an exception
```

See the [tests directory](https://github.com/maximilianhurl/bravado-django-test-client/blob/master/tests/tests.py) for a more complete example.