Properly test repository file uploads

Properly test whether it is possible to issue an HTTP POST request to
`api/v2/repositories/:id/upload_content`. Make the test for this feature submit
file data to the server in a correct manner.