Mercurial > hg > simpypi
annotate 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 |
rev | line source |
---|---|
60 | 1 Test Through The Web |
2 ==================== | |
3 | |
4 Test ``simpypi`` through the web with a test server. | |
5 | |
6 The obligatory imports:: | |
7 | |
8 >>> from simpypi.factory import factory | |
9 | |
10 Create a WSGI app:: | |
11 | |
12 >>> app = factory(directory=directory) | |
61 | 13 |
14 Now wrap it in a server:: | |
15 | |
16 >>> server = testserver(app, 'localhost', 64321) | |
17 >>> server.start() | |
18 | |
19 Shut down the server:: | |
20 | |
21 >>> server.stop() |