From 0aca8ebfb15237e60effce06ccff2085516117f6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 19 Jul 2014 02:23:19 +0200 Subject: Remove self-tests from all files --- module/network/Browser.py | 12 ------------ module/network/HTTPDownload.py | 14 -------------- module/network/HTTPRequest.py | 5 ----- 3 files changed, 31 deletions(-) (limited to 'module/network') diff --git a/module/network/Browser.py b/module/network/Browser.py index 3146d7f71..e78d24688 100644 --- a/module/network/Browser.py +++ b/module/network/Browser.py @@ -130,15 +130,3 @@ class Browser(object): del self.dl if hasattr(self, "cj"): del self.cj - -if __name__ == "__main__": - browser = Browser()#proxies={"socks5": "localhost:5000"}) - ip = "http://www.whatismyip.com/automation/n09230945.asp" - #browser.getPage("http://google.com/search?q=bar") - #browser.getPage("https://encrypted.google.com/") - #print browser.getPage(ip) - #print browser.getRedirectLocation("http://google.com/") - #browser.getPage("https://encrypted.google.com/") - #browser.getPage("http://google.com/search?q=bar") - - browser.httpDownload("http://speedtest.netcologne.de/test_10mb.bin", "test_10mb.bin") diff --git a/module/network/HTTPDownload.py b/module/network/HTTPDownload.py index 9b613b684..20ac00e48 100644 --- a/module/network/HTTPDownload.py +++ b/module/network/HTTPDownload.py @@ -323,17 +323,3 @@ class HTTPDownload: del self.cj if hasattr(self, "info"): del self.info - -if __name__ == "__main__": - url = "http://speedtest.netcologne.de/test_100mb.bin" - - from Bucket import Bucket - - bucket = Bucket() - bucket.setRate(200 * 1024) - bucket = None - - print "starting" - - dwnld = HTTPDownload(url, "test_100mb.bin", bucket=bucket) - dwnld.download(chunks=3, resume=True) diff --git a/module/network/HTTPRequest.py b/module/network/HTTPRequest.py index f61069b60..67635f944 100644 --- a/module/network/HTTPRequest.py +++ b/module/network/HTTPRequest.py @@ -301,8 +301,3 @@ class HTTPRequest: if hasattr(self, "c"): self.c.close() del self.c - -if __name__ == "__main__": - url = "http://pyload.org" - c = HTTPRequest() - print c.load(url) -- cgit v1.2.3