Annotation of pkgsrc/lang/python27/patches/patch-Lib_test_test__httplib.py, revision 1.1

1.1     ! mgorny      1: $NetBSD$
        !             2: 
        !             3: --- Lib/test/test_httplib.py.orig      2020-04-19 21:13:39.000000000 +0000
        !             4: +++ Lib/test/test_httplib.py
        !             5: @@ -384,6 +384,26 @@ class HeaderTests(TestCase):
        !             6:              with self.assertRaisesRegexp(ValueError, 'Invalid header'):
        !             7:                  conn.putheader(name, value)
        !             8:  
        !             9: +    def test_invalid_method_names(self):
        !            10: +        methods = (
        !            11: +            'GET\r',
        !            12: +            'POST\n',
        !            13: +            'PUT\n\r',
        !            14: +            'POST\nValue',
        !            15: +            'POST\nHOST:abc',
        !            16: +            'GET\nrHost:abc\n',
        !            17: +            'POST\rRemainder:\r',
        !            18: +            'GET\rHOST:\n',
        !            19: +            '\nPUT'
        !            20: +        )
        !            21: +
        !            22: +        for method in methods:
        !            23: +            with self.assertRaisesRegexp(
        !            24: +                    ValueError, "method can't contain control characters"):
        !            25: +                conn = httplib.HTTPConnection('example.com')
        !            26: +                conn.sock = FakeSocket(None)
        !            27: +                conn.request(method=method, url="/")
        !            28: +
        !            29:  
        !            30:  class BasicTest(TestCase):
        !            31:      def test_status_lines(self):

CVSweb <webmaster@jp.NetBSD.org>