# HG changeset patch # User Jeff Hammel # Date 1330646358 28800 # Node ID 53ec5144f84f0edcc0a080249d84e45b9f75a0b2 # Parent 46f5fd27ee54d8d6fdb51338e7833df24a9bb446 start serving PyPI diff -r 46f5fd27ee54 -r 53ec5144f84f tests/test.py --- a/tests/test.py Thu Mar 01 15:45:39 2012 -0800 +++ b/tests/test.py Thu Mar 01 15:59:18 2012 -0800 @@ -35,7 +35,7 @@ directory = os.path.dirname(os.path.abspath(__file__)) extraglobs = {'here': directory, 'create_virtualenv': create_virtualenv, - 'server': testserver.TestWSGIServer } + 'testserver': testserver.TestWSGIServer } doctest_args = dict(extraglobs=extraglobs, raise_on_error=raise_on_error) if report_first: doctest_args['optionflags'] = doctest.REPORT_ONLY_FIRST_FAILURE diff -r 46f5fd27ee54 -r 53ec5144f84f tests/test_ttw.txt --- a/tests/test_ttw.txt Thu Mar 01 15:45:39 2012 -0800 +++ b/tests/test_ttw.txt Thu Mar 01 15:59:18 2012 -0800 @@ -10,3 +10,12 @@ 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()