view tests/test_ttw.txt @ 61:53ec5144f84f

start serving PyPI
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 01 Mar 2012 15:59:18 -0800
parents 46f5fd27ee54
children 7c154953acc4
line wrap: on
line source

Test Through The Web
====================

Test ``simpypi`` through the web with a test server.

The obligatory imports::

    >>> from simpypi.factory import factory

Create a WSGI app::

    >>> app = factory(directory=directory)

Now wrap it in a server::

    >>> server = testserver(app, 'localhost', 64321)
    >>> server.start()

Shut down the server::

    >>> server.stop()