comparison tests/doctest.txt @ 36:a02d08627d9c

stub a test to upload a package
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 01 Mar 2012 09:28:55 -0800
parents 058182b7b309
children 1bdece293671
comparison
equal deleted inserted replaced
35:315b7b49eaf4 36:a02d08627d9c
14 14
15 Make a test application:: 15 Make a test application::
16 16
17 >>> app = simpypi.SimPyPI(directory) 17 >>> app = simpypi.SimPyPI(directory)
18 >>> testapp = TestApp(app) 18 >>> testapp = TestApp(app)
19
20 Upload a package::
21
22 >>> field = 'package'
23 >>> filename = 'HelloWorld-0.0.tar.gz'
24 >>> contents = file(os.path.join(here, filename)).read()
25 >>> response = testapp.post('/', upload_files=(field, filename, package))