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-Tester
==============

Testing tool of tornado web for any testing libraries.

Contextual Tester
-----------------

You can use testing tool by using 'with' statement. ::

import unittest
from tornado_tester import gen_test, Tester

from yourapplication import app

class Test(unittest.TestCase):
@gen_test
def test_app():
with Tester(app) as tester:
response = yield tester.http_client(tester.url_for('/hello'))
...

By using :meth:`url_for` you can make URL with current HTTP server's address.

And you can use it for py.test like. ::

import pytest
from tornado_tester import gen_test, Tester

from yourapplication import app


@pytest.fixture
def tester(request):
tester = Tester(app)

tester.setup()
request.addfinalizer(tester.teardown)
return tester


@gen_test
def test_app(tester):
response = yield tester.http_client(tester.url_for('/hello'))
...

.. warning::
You can't use multiple Testers in one gen_test by default.

You should provide a shared I/O loop to use multiple tester. ::

import pytest
from tornado.ioloop import IOLoop
from tornado_tester import gen_test, Tester

from yourapplication import app


@gen_test
def test_app():
loop = IOLoop()
tester1 = Tester(app, io_loop=loop)
tester2 = Tester(app, io_loop=loop)

with tester1:
...

with tester2:
...
Release History

Release History

0.1.1

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

0.1.0

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-Tester-0.1.1.tar.gz (1.4 kB) Copy SHA256 Checksum SHA256 Source Jul 13, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS 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