mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 20:44:50 +00:00
Fix httpdownloader Tests
This commit is contained in:
parent
ed229d2ace
commit
2d09035dc4
@ -60,10 +60,11 @@ class DownloadFileTestCase(unittest.TestCase):
|
|||||||
d.addCallback(self.assertContains, "This file should be called renamed")
|
d.addCallback(self.assertContains, "This file should be called renamed")
|
||||||
return d
|
return d
|
||||||
|
|
||||||
def test_download_with_rename_fail(self):
|
def test_download_with_rename_exists(self):
|
||||||
|
open('renamed', 'w').close()
|
||||||
url = "http://deluge-torrent.org/httpdownloader.php?test=rename&filename=renamed"
|
url = "http://deluge-torrent.org/httpdownloader.php?test=rename&filename=renamed"
|
||||||
d = download_file(url, "original")
|
d = download_file(url, "original")
|
||||||
d.addCallback(self.assertEqual, "original")
|
d.addCallback(self.assertEqual, "renamed-1")
|
||||||
d.addCallback(self.assertContains, "This file should be called renamed")
|
d.addCallback(self.assertContains, "This file should be called renamed")
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user