Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4cbd1e3

Browse files
committed
Move test case for HTTP response dict to httplib.
1 parent 6aab16e commit 4cbd1e3

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Lib/test/test_httplib.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,12 @@ def _test():
161161
resp.close()
162162

163163

164+
class OfflineTest(TestCase):
165+
def test_responses(self):
166+
self.assertEquals(httplib.responses[httplib.NOT_FOUND], "Not Found")
167+
164168
def test_main(verbose=None):
165-
tests = [HeaderTests,]
169+
tests = [HeaderTests,OfflineTest]
166170
test_support.run_unittest(*tests)
167171

168172
test()

Lib/test/test_urllib2.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ def test_trivial(self):
4141
buf = f.read()
4242
f.close()
4343

44-
def test_statudict(self):
45-
# test the new-in-2.5 httpresponses dictionary
46-
self.assertEquals(urllib2.httpresponses[404], "Not Found")
47-
4844
def test_parse_http_list(self):
4945
tests = [('a,b,c', ['a', 'b', 'c']),
5046
('path"o,l"og"i"cal, example', ['path"o,l"og"i"cal', 'example']),

0 commit comments

Comments
 (0)