c.l.t.test_upload : module documentation

Part of canonical.librarian.tests

No module docstring
Class MockTransport Undocumented
Class MockLibrary Undocumented
Class MockFile Undocumented
Function upload_request Librarian upload server test helper, process a request and report what
Function test_suite Undocumented
def upload_request(request):
Librarian upload server test helper, process a request and report what happens.

Inspired by the canonical.functional.http function used by the Launchpad page tests.

Hands a request to a librarian file upload protocol, and prints the reply from the server, a summary of the file uploaded, and whether the connection closed, e.g.:

reply: '200'
file u'foo.txt' stored as text/plain, contents: 'Foo!'

or:

reply: '400 STORE command expects the filename to be in UTF-8'
connection closed

Note that the Librarian itself except for the protocol logic is stubbed out by this function; it's intended to be used to unit test the protocol implementation, not end-to-end test the Librarian.

def test_suite():
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.