def _testUploadFileToItem(self, item, name, user, contents):
    '\n        Uploads a non-empty file to the server.\n        '
    resp = self.request(path='/file', method='POST', user=user, params={'parentType': 'item', 'parentId': item['_id'], 'name': name, 'size': len(contents)})
    self.assertStatusOk(resp)
    uploadId = resp.json['_id']
    resp = self.request(path='/file/chunk', method='POST', body=contents, user=user, params={'uploadId': uploadId}, type='application/octet-stream')
    self.assertStatusOk(resp)
Uploads a non-empty file to the server.
def _testUploadFileToItem(self, item, name, user, contents):
    '\n        \n        '
    resp = self.request(path='/file', method='POST', user=user, params={'parentType': 'item', 'parentId': item['_id'], 'name': name, 'size': len(contents)})
    self.assertStatusOk(resp)
    uploadId = resp.json['_id']
    resp = self.request(path='/file/chunk', method='POST', body=contents, user=user, params={'uploadId': uploadId}, type='application/octet-stream')
    self.assertStatusOk(resp)