support buffers as file-upload in the test client

This patch renders the use of NamedTemporaryFile for file upload testing unnecessary