Definition at line 82 of file ftest_SiteProxy.py.
◆ test_01_ProxySimple()
def ftests.ftest_SiteProxy.Test.test_01_ProxySimple |
( |
|
self | ) |
|
Definition at line 85 of file ftest_SiteProxy.py.
85 def test_01_ProxySimple(self):
86 dbWrapper = FakeDBWrapper()
88 url =
"http://www.latimes.com/local/lanow/la-me-ln-kamala-harris-lawsuit-car-donation-charities-20151201-story.html" 89 siteProperties = {
"HTTP_PROXY_HOST":
"host.com",
"HTTP_PROXY_PORT":
"8989",
"USER_PROXY":
"{}"}
90 proxyResolver = ProxyResolver(siteProperties, dbWrapper, siteId, url)
91 result = proxyResolver.getProxy()
92 self.assertTrue(result == (
"host.com",
"8989"))
◆ test_02_ProxyPropertyMode()
def ftests.ftest_SiteProxy.Test.test_02_ProxyPropertyMode |
( |
|
self | ) |
|
Definition at line 95 of file ftest_SiteProxy.py.
95 def test_02_ProxyPropertyMode(self):
96 dbWrapper = FakeDBWrapper()
98 url =
"http://www.latimes.com/local/lanow/la-me-ln-kamala-harris-lawsuit-car-donation-charities-20151201-story.html" 99 siteProperties = {
"USER_PROXY":
"{\"source\": 0, \"file_path\": \"file11.json\", \"proxies\": " +
100 "{\"toxic.com:9000\" : {\"host\": \"toxic.com:9000\", \"domains\":[\"www.latimes.com\"]," +
101 "\"priority\": 44, \"limits\": null}, " +
102 "\"proxic.com:9000\" : {\"host\": \"proxic.com:9000\", \"domains\":[\"*\"]," +
103 "\"priority\": 11, \"limits\": null}, " +
104 "\"nosic.com:9000\" : {\"host\": \"nosic.com:9000\", \"domains\":[\"www.latimes.com\"]," +
105 "\"priority\": 1, \"limits\": null}}}" 107 proxyResolver = ProxyResolver(siteProperties, dbWrapper, siteId, url)
108 result = proxyResolver.getProxy()
109 self.assertTrue(result == (
"nosic.com",
"9000"))
◆ test_03_ProxyDBMode()
def ftests.ftest_SiteProxy.Test.test_03_ProxyDBMode |
( |
|
self | ) |
|
Definition at line 112 of file ftest_SiteProxy.py.
112 def test_03_ProxyDBMode(self):
113 dbWrapper = FakeDBWrapper()
115 url =
"http://www.latimes.com/local/lanow/la-me-ln-kamala-harris-lawsuit-car-donation-charities-20151201-story.html" 116 siteProperties = {
"USER_PROXY":
"{\"source\": 1, \"file_path\": \"file11.json\", \"proxies\": {}}"}
117 proxyResolver = ProxyResolver(siteProperties, dbWrapper, siteId, url)
118 result = proxyResolver.getProxy()
119 self.assertTrue(result == (
"ibm.com",
"9090"))
◆ test_04_ProxyLimits()
def ftests.ftest_SiteProxy.Test.test_04_ProxyLimits |
( |
|
self | ) |
|
Definition at line 122 of file ftest_SiteProxy.py.
122 def test_04_ProxyLimits(self):
123 dbWrapper = FakeDBWrapper()
126 url =
"http://www.latimes.com/local/lanow/la-me-ln-kamala-harris-lawsuit-car-donation-charities-20151201-story.html" 127 siteProperties = {
"USER_PROXY":
"{\"source\": 1, \"file_path\": \"file22.json\", \"proxies\": {}}"}
128 proxyResolver = ProxyResolver(siteProperties, dbWrapper, siteId, url)
129 result = proxyResolver.getProxy()
130 self.assertTrue(result == (
"intel.com",
"11"))
◆ test_05_ProxyLimitsExtend()
def ftests.ftest_SiteProxy.Test.test_05_ProxyLimitsExtend |
( |
|
self | ) |
|
Definition at line 133 of file ftest_SiteProxy.py.
133 def test_05_ProxyLimitsExtend(self):
134 dbWrapper = FakeDBWrapper()
137 url =
"http://www.latimes.com/local/lanow/la-me-ln-kamala-harris-lawsuit-car-donation-charities-20151201-story.html" 138 siteProperties = {
"USER_PROXY":
"{\"source\": 1, \"file_path\": \"file33.json\", \"proxies\": {}}"}
139 proxyResolver = ProxyResolver(siteProperties, dbWrapper, siteId, url)
140 result = proxyResolver.getProxy()
141 self.assertTrue(result == (
"intel.com",
"44"))
The documentation for this class was generated from the following file: