Author: johnnyg

Revision: 5604

Log:
        Add test file for httpdownloader.

Diff:
Added: trunk/tests/test_httpdownloader.py
===================================================================
--- trunk/tests/test_httpdownloader.py                          (rev 0)
+++ trunk/tests/test_httpdownloader.py  2009-07-31 23:53:23 UTC (rev 5604)
@@ -0,0 +1,28 @@
+from twisted.trial import unittest
+from twisted.python.failure import Failure
+
+from deluge.httpdownloader import download_file
+
+class DownloadFileTestCase(unittest.TestCase):
+    def test_download(self):
+        d = download_file("http://deluge-torrent.org";, "index.html")
+        d.addCallback(self.assertEqual, "index.html")
+        return d
+
+    def test_download_with_cookies(self):
+        pass
+
+    def test_page_moved(self):
+        pass
+
+    def test_page_moved_permanently(self):
+        pass
+
+    def test_page_not_modified(self):
+        pass
+
+    def test_page_not_found(self):
+        d = download_file("http://does.not.exist";, "none")
+        d.addCallback(self.fail)
+        d.addErrback(self.assertIsInstance, Failure)
+        return d



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to