]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove some test code.
authorJeremy Hylton <jeremy@alum.mit.edu>
Wed, 13 Nov 2002 17:30:32 +0000 (17:30 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Wed, 13 Nov 2002 17:30:32 +0000 (17:30 +0000)
The buggy yahoo server was fixed, and the opalgroup test files are
gone.

Lib/httplib.py

index 0dbd6e49b88b5fbf2afdba1b12fc142ea03e1fa5..d367ea7ac29f091ff51f1f82e824e8f70eca614e 100644 (file)
@@ -1224,8 +1224,6 @@ def test():
     if hasattr(socket, 'ssl'):
 
         for host, selector in (('sourceforge.net', '/projects/python'),
-                               ('dbserv2.theopalgroup.com', '/mediumfile'),
-                               ('dbserv2.theopalgroup.com', '/smallfile'),
                                ):
             print "https://%s%s" % (host, selector)
             hs = HTTPS()
@@ -1242,36 +1240,5 @@ def test():
                 for header in headers.headers: print header.strip()
             print
 
-    # Test a buggy server -- returns garbled status line.
-    # http://www.yahoo.com/promotions/mom_com97/supermom.html
-    c = HTTPConnection("promotions.yahoo.com")
-    c.set_debuglevel(1)
-    c.connect()
-    c.request("GET", "/promotions/mom_com97/supermom.html")
-    r = c.getresponse()
-    print r.status, r.version
-    lines = r.read().split("\n")
-    print "\n".join(lines[:5])
-
-    c = HTTPConnection("promotions.yahoo.com", strict=1)
-    c.set_debuglevel(1)
-    c.connect()
-    c.request("GET", "/promotions/mom_com97/supermom.html")
-    try:
-        r = c.getresponse()
-    except BadStatusLine, err:
-        print "strict mode failed as expected"
-        print err
-    else:
-        print "XXX strict mode should have failed"
-
-    for strict in 0, 1:
-        h = HTTP(strict=strict)
-        h.connect("promotions.yahoo.com")
-        h.putrequest('GET', "/promotions/mom_com97/supermom.html")
-        h.endheaders()
-        status, reason, headers = h.getreply()
-        assert (strict and status == -1) or status == 200, (strict, status)
-
 if __name__ == '__main__':
     test()