
On 09/10/2014 12:57 PM, CrÃstian Viana wrote:
On 09-09-2014 23:44, Aline Manera wrote:
+ # upload Kimchi's "COPYING" and compare its + # content to the corresponding file in the storage pool
The test below doesn't match with this description. I couldn't find where the uploaded file's content is compared to the original file's.
The test_rest.py uses mockmodel.py which means the file will not upload in real. It is just added to ad dict. Because that we can not compare the files content.
+ files={'file': open(vol_path, 'rb')},
You need to close the file handler opened above.
ACK.
+ # Max body size is set to 4M so the upload will fail with 413
4M? Isn't it 4G?
For tests we setup the Kimchi server to use 4M as max_body_size. Check run_server() in tests/utils.py
+ r = requests.post(url, + files={'file': open(vol_path, 'rb')}, You also need to close this file handler.
ACK.