From dc8766874e39b9a7132bd958093a975228112948 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 28 Jul 2018 14:08:56 +0100 Subject: [PATCH] [Tests] Fix testing core.add_torrent_url on Py3 --- deluge/tests/test_core.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deluge/tests/test_core.py b/deluge/tests/test_core.py index 9169c3ebd..4fc23ab7c 100644 --- a/deluge/tests/test_core.py +++ b/deluge/tests/test_core.py @@ -37,7 +37,7 @@ common.disable_new_release_check() class CookieResource(Resource): def render(self, request): - if request.getCookie('password') != 'deluge': + if request.getCookie(b'password') != b'deluge': request.setResponseCode(FORBIDDEN) return @@ -72,11 +72,11 @@ class TopLevelResource(Resource): def __init__(self): Resource.__init__(self) - self.putChild('cookie', CookieResource()) - self.putChild('partial', PartialDownload()) - self.putChild('redirect', RedirectResource()) + self.putChild(b'cookie', CookieResource()) + self.putChild(b'partial', PartialDownload()) + self.putChild(b'redirect', RedirectResource()) self.putChild( - 'ubuntu-9.04-desktop-i386.iso.torrent', + b'ubuntu-9.04-desktop-i386.iso.torrent', File(common.get_test_data_file('ubuntu-9.04-desktop-i386.iso.torrent')), )