mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 12:04:10 +00:00
[Tests] Fix AttributeError in test_core with Twisted 19
Should be setting header contents to string not ints and latest version of Twisted raised an error encountering int. Also correct the header name for setting length.
This commit is contained in:
parent
615500e6e6
commit
3c18e890e8
@ -54,7 +54,7 @@ class PartialDownload(Resource):
|
||||
common.get_test_data_file('ubuntu-9.04-desktop-i386.iso.torrent'), 'rb'
|
||||
) as _file:
|
||||
data = _file.read()
|
||||
request.setHeader(b'Content-Type', len(data))
|
||||
request.setHeader(b'Content-Length', str(len(data)))
|
||||
request.setHeader(b'Content-Type', b'application/x-bittorrent')
|
||||
if request.requestHeaders.hasHeader('accept-encoding'):
|
||||
return compress(data, request)
|
||||
|
Loading…
x
Reference in New Issue
Block a user