[1] + def completed(result): + self.fail() + + def aborted(failure): + self.assertEquals(fetched_urls, ["http://right/", "http://wrong/"]) + + d.addCallback(completed) + d.addErrback(aborted) + return d
You should use assertFailure in this case: you can remove the self.fail(), and add aborted as a callback.
[2] + L{fetch_to_files} fetches a list of URLs and save they're content
Typo: their content
[3] Pyflakes: landscape/package/tests/test_taskhandler.py:7: 'CommandError' imported but unused
+1!
[1] ls(fetched_ urls, ["http:// right/", "http:// wrong/"]) completed) aborted)
+ def completed(result):
+ self.fail()
+
+ def aborted(failure):
+ self.assertEqua
+
+ d.addCallback(
+ d.addErrback(
+ return d
You should use assertFailure in this case: you can remove the self.fail(), and add aborted as a callback.
[2]
+ L{fetch_to_files} fetches a list of URLs and save they're content
Typo: their content
[3] Pyflakes: package/ tests/test_ taskhandler. py:7: 'CommandError' imported but unused
landscape/
+1!