diff options
author | Trent Nelson <trent.nelson@snakebite.org> | 2008-04-09 00:34:53 (GMT) |
---|---|---|
committer | Trent Nelson <trent.nelson@snakebite.org> | 2008-04-09 00:34:53 (GMT) |
commit | 6c4a7c68211219b58c01c5a87f5238623d3073eb (patch) | |
tree | 15ca197f09087dc31847658578b674f5f86d89ee /Lib/test/test_httplib.py | |
parent | 79e42a0e0817b9c9fc23b333524427662b33986d (diff) | |
download | cpython-6c4a7c68211219b58c01c5a87f5238623d3073eb.zip cpython-6c4a7c68211219b58c01c5a87f5238623d3073eb.tar.gz cpython-6c4a7c68211219b58c01c5a87f5238623d3073eb.tar.bz2 |
Fix typo with regards to self.PORT shadowing class variables with the same name.
Diffstat (limited to 'Lib/test/test_httplib.py')
-rw-r--r-- | Lib/test/test_httplib.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py index 68c0ac3..fcbddd0 100644 --- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@ -203,7 +203,7 @@ class TimeoutTest(TestCase): def setUp(self): self.serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - self.PORT = test_support.bind_port(self.serv) + TimeoutTest.PORT = test_support.bind_port(self.serv) self.serv.listen(5) def tearDown(self): @@ -215,13 +215,13 @@ class TimeoutTest(TestCase): HTTPConnection and into the socket. ''' # default - httpConn = httplib.HTTPConnection(HOST, self.PORT) + httpConn = httplib.HTTPConnection(HOST, TimeoutTest.PORT) httpConn.connect() self.assertTrue(httpConn.sock.gettimeout() is None) httpConn.close() # a value - httpConn = httplib.HTTPConnection(HOST, self.PORT, timeout=30) + httpConn = httplib.HTTPConnection(HOST, TimeoutTest.PORT, timeout=30) httpConn.connect() self.assertEqual(httpConn.sock.gettimeout(), 30) httpConn.close() @@ -230,7 +230,8 @@ class TimeoutTest(TestCase): previous = socket.getdefaulttimeout() socket.setdefaulttimeout(30) try: - httpConn = httplib.HTTPConnection(HOST, self.PORT, timeout=None) + httpConn = httplib.HTTPConnection(HOST, TimeoutTest.PORT, + timeout=None) httpConn.connect() finally: socket.setdefaulttimeout(previous) |