This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Tornado-Expects is a matchers library for the Expects assertion library. It provides matchers for the Tornado web framework request and response objects.

Installation

You can install the last stable release from PyPI using pip or easy_install.

$ pip install tornado-expects

Also you can install the latest sources from Github.

$ pip install -e git+git://github.com/jaimegildesagredo/tornado-expects.git#egg=tornado-expects

Usage

Just import the expect callable and the Tornado-Expects matchers and start writing assertions for test doubles.

from expects import expect
from tornado_expects import *
from tornado.httpclient import HTTPClient

response = http_client.fetch('https://example.com')

expect(response).to(be_ok)

Matchers

be_ok

expect(response).to(be_ok)
expect(response).not_to(be_ok)

be_json

expect(response).to(be_json)
expect(response).not_to(be_json)

have_header

expect(response).to(have_header('Content-Type'))
expect(response).to(have_header('Content-Type', 'text/xml'))
expect(response).to(have_header('Content-Type', start_with('text/xml')))
expect(response).not_to(have_header('ETag'))

have_headers

expect(response).to(have_headers('Content-Type', 'Content-Length'))
expect(response).to(have_headers({'Content-Type': 'text/html'}))
expect(response).not_to(have_headers('Etag', 'Authorization'))

have_status

expect(response).to(have_status(304))
expect(response).not_to(have_status(500))

Specs

To run the specs you should install the testing requirements and then run mamba.

$ python setup.py develop
$ pip install -r test-requirements.txt
$ mamba

License

The Tornado-Expects is released under the Apache2 license.

Release History

Release History

0.1.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
tornado-expects-0.1.0.tar.gz (3.2 kB) Copy SHA256 Checksum SHA256 Source Aug 17, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting