def _testDownloadSingleFileItem(self, item, user, contents):
    '\n        Downloads a single-file item from the server\n        :param item: The item to download.\n        :type item: dict\n        :param contents: The expected contents.\n        :type contents: str\n        '
    resp = self.request(path=('/item/%s/download' % item['_id']), method='GET', user=user, isJson=False)
    self.assertStatusOk(resp)
    self.assertEqual(contents, self.getBody(resp))
    self.assertEqual(resp.headers['Content-Disposition'], 'attachment; filename="file_1"')
    params = {'contentDisposition': 'inline'}
    resp = self.request(path=('/item/%s/download' % item['_id']), method='GET', user=user, isJson=False, params=params)
    self.assertStatusOk(resp)
    self.assertEqual(contents, self.getBody(resp))
    self.assertEqual(resp.headers['Content-Disposition'], 'inline; filename="file_1"')
    resp = self.request(path=('/item/%s/download' % item['_id']), method='GET', user=user, isJson=False, params={'offset': 1})
    self.assertStatus(resp, 206)
    self.assertEqual(contents[1:], self.getBody(resp))
Downloads a single-file item from the server
:param item: The item to download.
:type item: dict
:param contents: The expected contents.
:type contents: str
def _testDownloadSingleFileItem(self, item, user, contents):
    '\n        Downloads a single-file item from the server\n        :param item: The item to download.\n        :type item: dict\n        :param contents: The expected contents.\n        :type contents: str\n        '
    resp = self.request(path=('/item/%s/download' % item['_id']), method='GET', user=user, isJson=False)
    self.assertStatusOk(resp)
    self.assertEqual(contents, self.getBody(resp))
    self.assertEqual(resp.headers['Content-Disposition'], 'attachment; filename="file_1"')
    params = {'contentDisposition': 'inline'}
    resp = self.request(path=('/item/%s/download' % item['_id']), method='GET', user=user, isJson=False, params=params)
    self.assertStatusOk(resp)
    self.assertEqual(contents, self.getBody(resp))
    self.assertEqual(resp.headers['Content-Disposition'], 'inline; filename="file_1"')
    resp = self.request(path=('/item/%s/download' % item['_id']), method='GET', user=user, isJson=False, params={'offset': 1})
    self.assertStatus(resp, 206)
    self.assertEqual(contents[1:], self.getBody(resp))