Part of lp.services.librarianserver.tests
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 |
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.