| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 import sys | 3 import sys |
| 4 import threading | 4 import threading |
| 5 import urlparse | 5 import urlparse |
| 6 import urllib2 | 6 import urllib2 |
| 7 import BaseHTTPServer | 7 import BaseHTTPServer |
| 8 import unittest | 8 import unittest |
| 9 import hashlib | 9 import hashlib |
| 10 from test import test_support | 10 from test import test_support |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 219 self.end_headers() | 219 self.end_headers() |
| 220 self.wfile.write("You've reached %s!<BR>" % self.path) | 220 self.wfile.write("You've reached %s!<BR>" % self.path) |
| 221 self.wfile.write("Our apologies, but our server is down due to " | 221 self.wfile.write("Our apologies, but our server is down due to " |
| 222 "a sudden zombie invasion.") | 222 "a sudden zombie invasion.") |
| 223 | 223 |
| 224 # Test cases | 224 # Test cases |
| 225 | 225 |
| 226 class ProxyAuthTests(unittest.TestCase): | 226 class ProxyAuthTests(unittest.TestCase): |
| 227 URL = "http://www.foo.com" | 227 URL = "http://www.foo.com" |
| 228 | 228 |
| 229 PORT = 8080 | 229 PORT = 8765 |
|
Nicholas Riley
2008/08/04 02:59:41
Seems to be an unrelated change; if this is a prob
Leo Soto M.
2008/08/04 03:11:53
On 2008/08/04 02:59:41, Nicholas Riley wrote:
> Se
| |
| 230 USER = "tester" | 230 USER = "tester" |
| 231 PASSWD = "test123" | 231 PASSWD = "test123" |
| 232 REALM = "TestRealm" | 232 REALM = "TestRealm" |
| 233 | 233 |
| 234 PROXY_URL = "http://127.0.0.1:%d" % PORT | 234 PROXY_URL = "http://127.0.0.1:%d" % PORT |
| 235 | 235 |
| 236 def setUp(self): | 236 def setUp(self): |
| 237 FakeProxyHandler.digest_auth_handler.set_users({ | 237 FakeProxyHandler.digest_auth_handler.set_users({ |
| 238 self.USER : self.PASSWD | 238 self.USER : self.PASSWD |
| 239 }) | 239 }) |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 293 # We will NOT depend on the network resource flag | 293 # We will NOT depend on the network resource flag |
| 294 # (Lib/test/regrtest.py -u network) since all tests here are only | 294 # (Lib/test/regrtest.py -u network) since all tests here are only |
| 295 # localhost. However, if this is a bad rationale, then uncomment | 295 # localhost. However, if this is a bad rationale, then uncomment |
| 296 # the next line. | 296 # the next line. |
| 297 #test_support.requires("network") | 297 #test_support.requires("network") |
| 298 | 298 |
| 299 test_support.run_unittest(ProxyAuthTests) | 299 test_support.run_unittest(ProxyAuthTests) |
| 300 | 300 |
| 301 if __name__ == "__main__": | 301 if __name__ == "__main__": |
| 302 test_main() | 302 test_main() |
| OLD | NEW |