Skip to content

0.19.1: pytest based test suite is failing #192

@kloczek

Description

@kloczek
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-httplib2-0.19.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-httplib2-0.19.1-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/python3 -Bm pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-6.2.3, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/tkloczko/rpmbuild/BUILD/httplib2-0.19.1/.hypothesis/examples')
rootdir: /home/tkloczko/rpmbuild/BUILD/httplib2-0.19.1, configfile: setup.cfg
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, asyncio-0.14.0, expect-1.1.0, cov-2.11.1, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, cases-3.4.6, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, flaky-3.7.0, mock-3.6.0, hypothesis-6.12.0
timeout: 17.0s
timeout method: signal
timeout func_only: False
collected 199 items

tests/test_auth.py::test_credentials PASSED                                                                                                                          [  0%]

[..]

tests/test_https.py::test_get_via_https FAILED                                                                                                                       [ 67%]
tests/test_https.py::test_get_301_via_https FAILED                                                                                                                   [ 68%]
tests/test_https.py::test_get_301_via_https_spec_violation_on_location FAILED                                                                                        [ 68%]
tests/test_https.py::test_invalid_ca_certs_path FAILED                                                                                                               [ 69%]
tests/test_https.py::test_not_trusted_ca FAILED                                                                                                                      [ 69%]
tests/test_https.py::test_set_tls_version[None-maximum_version] PASSED                                                                                               [ 70%]
tests/test_https.py::test_set_tls_version[None-minimum_version] PASSED                                                                                               [ 70%]
tests/test_https.py::test_set_tls_version[TLSv1_2-maximum_version] PASSED                                                                                            [ 71%]
tests/test_https.py::test_set_tls_version[TLSv1_2-minimum_version] PASSED                                                                                            [ 71%]
tests/test_https.py::test_set_tls_version[TLSVersion.TLSv1_2-maximum_version] PASSED                                                                                 [ 72%]
tests/test_https.py::test_set_tls_version[TLSVersion.TLSv1_2-minimum_version] PASSED                                                                                 [ 72%]
tests/test_https.py::test_min_tls_version FAILED                                                                                                                     [ 73%]
tests/test_https.py::test_max_tls_version FAILED                                                                                                                     [ 73%]
tests/test_https.py::test_client_cert_verified FAILED                                                                                                                [ 74%]
tests/test_https.py::test_client_cert_password_verified FAILED                                                                                                       [ 74%]
tests/test_https.py::test_sni_set_servername_callback FAILED                                                                                                         [ 75%]
tests/test_other.py::test_convert_byte_str PASSED                                                                                                                    [ 75%]
tests/test_other.py::test_reflect PASSED                                                                                                                             [ 76%]
tests/test_other.py::test_pickle_http PASSED                                                                                                                         [ 76%]
tests/test_other.py::test_pickle_http_with_connection PASSED                                                                                                         [ 77%]
tests/test_other.py::test_pickle_custom_request_http PASSED                                                                                                          [ 77%]
tests/test_other.py::test_timeout_global XPASS (FIXME: for unknown reason global timeout test fails in Python3 with response 200)                                    [ 78%]
tests/test_other.py::test_timeout_individual PASSED                                                                                                                  [ 78%]
tests/test_other.py::test_timeout_subsequent PASSED                                                                                                                  [ 79%]
tests/test_other.py::test_timeout_https PASSED                                                                                                                       [ 79%]
tests/test_other.py::test_connection_close PASSED                                                                                                                    [ 80%]
tests/test_other.py::test_get_end2end_headers PASSED                                                                                                                 [ 80%]
tests/test_other.py::test_ipv6[http] PASSED                                                                                                                          [ 81%]
tests/test_other.py::test_ipv6[https] PASSED                                                                                                                         [ 81%]
tests/test_other.py::test_connection_proxy_info_attribute_error[HTTPConnectionWithTimeout] PASSED                                                                    [ 82%]
tests/test_other.py::test_connection_proxy_info_attribute_error[HTTPSConnectionWithTimeout] PASSED                                                                   [ 82%]
tests/test_other.py::test_http_443_forced_https PASSED                                                                                                               [ 83%]
tests/test_other.py::test_close PASSED                                                                                                                               [ 83%]
tests/test_other.py::test_connect_exception_type PASSED                                                                                                              [ 84%]
tests/test_proxy.py::test_from_url PASSED                                                                                                                            [ 84%]
tests/test_proxy.py::test_from_url_ident PASSED                                                                                                                      [ 85%]
tests/test_proxy.py::test_from_env PASSED                                                                                                                            [ 85%]
tests/test_proxy.py::test_from_env_https PASSED                                                                                                                      [ 86%]
tests/test_proxy.py::test_from_env_none PASSED                                                                                                                       [ 86%]
tests/test_proxy.py::test_applies_to PASSED                                                                                                                          [ 87%]
tests/test_proxy.py::test_noproxy_trailing_comma PASSED                                                                                                              [ 87%]
tests/test_proxy.py::test_noproxy_star PASSED                                                                                                                        [ 88%]
tests/test_proxy.py::test_headers PASSED                                                                                                                             [ 88%]
tests/test_proxy.py::test_server_not_found_error_is_raised_for_invalid_hostname FAILED                                                                               [ 89%]
tests/test_proxy.py::test_auth_str_bytes PASSED                                                                                                                      [ 89%]
tests/test_proxy.py::test_socks5_auth FAILED                                                                                                                         [ 90%]
tests/test_proxy.py::test_functional_noproxy_star_http PASSED                                                                                                        [ 90%]
tests/test_proxy.py::test_functional_noproxy_star_https FAILED                                                                                                       [ 91%]
tests/test_uri.py::test_from_std66 PASSED                                                                                                                            [ 91%]
tests/test_uri.py::test_norm PASSED                                                                                                                                  [ 92%]
tests/test_uri.py::test_safename[('', ',d41d8cd98f00b204e9800998ecf8427e')] PASSED                                                                                   [ 92%]
tests/test_uri.py::test_safename[('http://example.org/fred/?a=b', 'example.orgfreda=b,58489f63a7a83c3b7794a6a398ee8b1f')] PASSED                                     [ 93%]
tests/test_uri.py::test_safename[('http://example.org/fred?/a=b', 'example.orgfreda=b,8c5946d56fec453071f43329ff0be46b')] PASSED                                     [ 93%]
tests/test_uri.py::test_safename[('http://www.example.org/fred?/a=b', 'www.example.orgfreda=b,499c44b8d844a011b67ea2c015116968')] PASSED                             [ 94%]
tests/test_uri.py::test_safename[('https://www.example.org/fred?/a=b', 'www.example.orgfreda=b,692e843a333484ce0095b070497ab45d')] PASSED                            [ 94%]
tests/test_uri.py::test_safename[('http://www/', 'www,1c73b6efd55cef1164fc084ecc331965')] PASSED                                                                     [ 95%]
tests/test_uri.py::test_safename[('http://\u2304.org/fred/?a=b', '.orgfreda=b,ecaf0f97756c0716de76f593bd60a35e')] PASSED                                             [ 95%]
tests/test_uri.py::test_safename[('normal-resource-name.js', 'normal-resource-name.js,8ff7c46fd6e61bf4e91a0a1606954a54')] PASSED                                     [ 96%]
tests/test_uri.py::test_safename[('foo://dom/path/brath/carapath', 'dompathbrathcarapath,83db942781ed975c7a5b7c24039f8ca3')] PASSED                                  [ 96%]
tests/test_uri.py::test_safename[('with/slash', 'withslash,17cc656656bb8ce2411bd41ead56d176')] PASSED                                                                [ 97%]
tests/test_uri.py::test_safename[('thisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuch', 'thisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuchthisistoomuc,c4553439dd179422c6acf6a8ac093eb6')] PASSED [ 97%]
tests/test_uri.py::test_safename[('\u043f\u0440', ',9f18c0db74a9734e9d18461e16345083')] PASSED                                                                       [ 98%]
tests/test_uri.py::test_safename[(b'\\xd0\\xbf\\xd1\\x80', ',9f18c0db74a9734e9d18461e16345083')] PASSED                                                              [ 98%]
tests/test_uri.py::test_safename[(b'column\\tvalues/unstr.zip', 'columnvaluesunstr.zip,b9740dcd0553e11b526450ceb8f76683')] PASSED                                    [ 99%]
tests/test_uri.py::test_safename2 PASSED                                                                                                                             [100%]

================================================================================= FAILURES =================================================================================
____________________________________________________________________________ test_get_via_https ____________________________________________________________________________
tests/test_https.py:12: in test_get_via_https
    with tests.server_const_http(tls=True) as uri:
        http       = <httplib2.Http object at 0x7f6c657bc250>
/usr/lib64/python3.8/contextlib.py:113: in __enter__
    return next(self.gen)
        self       = <contextlib._GeneratorContextManager object at 0x7f6c657bc460>
tests/__init__.py:345: in server_socket
    context.load_cert_chain(tls)
E   ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
        bind_hostname = 'localhost'
        context    = <ssl.SSLContext object at 0x7f6c66488ac0>
        fun        = <function server_request.<locals>.server_request_socket_handler at 0x7f6c66525040>
        gcounter   = [0]
        gresult    = [None]
        request_count = 1
        scheme     = ''
        server     = <socket.socket fd=14, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 33027)>
        server_port = 33027
        server_socket_thread = <function server_socket.<locals>.server_socket_thread at 0x7f6c66525af0>
        tick       = <function server_socket.<locals>.tick at 0x7f6c66525280>
        timeout    = 5
        tls        = '/home/tkloczko/rpmbuild/BUILD/httplib2-0.19.1/tests/tls/server_chain.pem'
        tls_skip_errors = ['TLSV1_ALERT_UNKNOWN_CA']
__________________________________________________________________________ test_get_301_via_https __________________________________________________________________________
tests/test_https.py:26: in test_get_301_via_https
    with tests.server_request(handler, request_count=2, tls=True) as uri:
        glocation  = ['']
        handler    = <function test_get_301_via_https.<locals>.handler at 0x7f6c664b2a60>
        http       = <httplib2.Http object at 0x7f6c66395250>
/usr/lib64/python3.8/contextlib.py:113: in __enter__
    return next(self.gen)
        self       = <contextlib._GeneratorContextManager object at 0x7f6c66395490>
tests/__init__.py:345: in server_socket
    context.load_cert_chain(tls)
E   ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
        bind_hostname = 'localhost'
        context    = <ssl.SSLContext object at 0x7f6c656f5d40>
        fun        = <function server_request.<locals>.server_request_socket_handler at 0x7f6c664b2dc0>
        gcounter   = [0]
        gresult    = [None]
        request_count = 2
        scheme     = ''
        server     = <socket.socket fd=16, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 45237)>
        server_port = 45237
        server_socket_thread = <function server_socket.<locals>.server_socket_thread at 0x7f6c664b2ee0>
        tick       = <function server_socket.<locals>.tick at 0x7f6c664b2e50>
        timeout    = 5
        tls        = '/home/tkloczko/rpmbuild/BUILD/httplib2-0.19.1/tests/tls/server_chain.pem'
        tls_skip_errors = ['TLSV1_ALERT_UNKNOWN_CA']
____________________________________________________________ test_get_301_via_https_spec_violation_on_location _____________________________________________________________
tests/test_https.py:46: in test_get_301_via_https_spec_violation_on_location
    with tests.server_request(handler, request_count=2, tls=True) as uri:
        handler    = <function test_get_301_via_https_spec_violation_on_location.<locals>.handler at 0x7f6c664b2b80>
        http       = <httplib2.Http object at 0x7f6c66111640>
/usr/lib64/python3.8/contextlib.py:113: in __enter__
    return next(self.gen)
        self       = <contextlib._GeneratorContextManager object at 0x7f6c661110d0>
tests/__init__.py:345: in server_socket
    context.load_cert_chain(tls)
E   ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
        bind_hostname = 'localhost'
        context    = <ssl.SSLContext object at 0x7f6c664a6ac0>
        fun        = <function server_request.<locals>.server_request_socket_handler at 0x7f6c664a5430>
        gcounter   = [0]
        gresult    = [None]
        request_count = 2
        scheme     = ''
        server     = <socket.socket fd=17, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 58795)>
        server_port = 58795
        server_socket_thread = <function server_socket.<locals>.server_socket_thread at 0x7f6c664a5550>
        tick       = <function server_socket.<locals>.tick at 0x7f6c664a54c0>
        timeout    = 5
        tls        = '/home/tkloczko/rpmbuild/BUILD/httplib2-0.19.1/tests/tls/server_chain.pem'
        tls_skip_errors = ['TLSV1_ALERT_UNKNOWN_CA']
________________________________________________________________________ test_invalid_ca_certs_path ________________________________________________________________________
tests/test_https.py:55: in test_invalid_ca_certs_path
    with tests.server_const_http(request_count=0, tls=True) as uri:
        http       = <httplib2.Http object at 0x7f6c6622e610>
/usr/lib64/python3.8/contextlib.py:113: in __enter__
    return next(self.gen)
        self       = <contextlib._GeneratorContextManager object at 0x7f6c6622e6a0>
tests/__init__.py:345: in server_socket
    context.load_cert_chain(tls)
E   ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
        bind_hostname = 'localhost'
        context    = <ssl.SSLContext object at 0x7f6c664a6b40>
        fun        = <function server_request.<locals>.server_request_socket_handler at 0x7f6c664a5670>
        gcounter   = [0]
        gresult    = [None]
        request_count = 0
        scheme     = ''
        server     = <socket.socket fd=18, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 55175)>
        server_port = 55175
        server_socket_thread = <function server_socket.<locals>.server_socket_thread at 0x7f6c664a59d0>
        tick       = <function server_socket.<locals>.tick at 0x7f6c664a5940>
        timeout    = 5
        tls        = '/home/tkloczko/rpmbuild/BUILD/httplib2-0.19.1/tests/tls/server_chain.pem'
        tls_skip_errors = ['TLSV1_ALERT_UNKNOWN_CA']
___________________________________________________________________________ test_not_trusted_ca ____________________________________________________________________________
tests/test_https.py:64: in test_not_trusted_ca
    with tests.server_const_http(tls=True) as uri:
        http       = <httplib2.Http object at 0x7f6c664e1040>
/usr/lib64/python3.8/contextlib.py:113: in __enter__
    return next(self.gen)
        self       = <contextlib._GeneratorContextManager object at 0x7f6c6647c2e0>
tests/__init__.py:345: in server_socket
    context.load_cert_chain(tls)
E   ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
        bind_hostname = 'localhost'
        context    = <ssl.SSLContext object at 0x7f6c6611f840>
        fun        = <function server_request.<locals>.server_request_socket_handler at 0x7f6c664a5e50>
        gcounter   = [0]
        gresult    = [None]
        request_count = 1
        scheme     = ''
        server     = <socket.socket fd=19, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 59375)>
        server_port = 59375
        server_socket_thread = <function server_socket.<locals>.server_socket_thread at 0x7f6c664a5f70>
        tick       = <function server_socket.<locals>.tick at 0x7f6c664a5ee0>
        timeout    = 5
        tls        = '/home/tkloczko/rpmbuild/BUILD/httplib2-0.19.1/tests/tls/server_chain.pem'
        tls_skip_errors = ['TLSV1_ALERT_UNKNOWN_CA']
___________________________________________________________________________ test_min_tls_version ___________________________________________________________________________
tests/test_https.py:107: in test_min_tls_version
    with tests.server_const_http(tls=setup_tls) as uri:
        http       = <httplib2.Http object at 0x7f6c6620ce20>
        setup_tls  = <function test_min_tls_version.<locals>.setup_tls at 0x7f6c664a5b80>
/usr/lib64/python3.8/contextlib.py:113: in __enter__
    return next(self.gen)
        self       = <contextlib._GeneratorContextManager object at 0x7f6c6620cd00>
tests/__init__.py:342: in server_socket
    context.load_cert_chain(SERVER_CHAIN)
E   ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
        bind_hostname = 'localhost'
        context    = <ssl.SSLContext object at 0x7f6c6649e840>
        fun        = <function server_request.<locals>.server_request_socket_handler at 0x7f6c665179d0>
        gcounter   = [0]
        gresult    = [None]
        request_count = 1
        scheme     = ''
        server     = <socket.socket fd=21, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 48109)>
        server_port = 48109
        server_socket_thread = <function server_socket.<locals>.server_socket_thread at 0x7f6c66517a60>
        tick       = <function server_socket.<locals>.tick at 0x7f6c66517790>
        timeout    = 5
        tls        = <function test_min_tls_version.<locals>.setup_tls at 0x7f6c664a5b80>
        tls_skip_errors = ['TLSV1_ALERT_UNKNOWN_CA']
___________________________________________________________________________ test_max_tls_version ___________________________________________________________________________
tests/test_https.py:121: in test_max_tls_version
    with tests.server_const_http(tls=True) as uri:
        http       = <httplib2.Http object at 0x7f6c6622ed90>
/usr/lib64/python3.8/contextlib.py:113: in __enter__
    return next(self.gen)
        self       = <contextlib._GeneratorContextManager object at 0x7f6c6622e580>
tests/__init__.py:345: in server_socket
    context.load_cert_chain(tls)
E   ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
        bind_hostname = 'localhost'
        context    = <ssl.SSLContext object at 0x7f6c6649eb40>
        fun        = <function server_request.<locals>.server_request_socket_handler at 0x7f6c66517280>
        gcounter   = [0]
        gresult    = [None]
        request_count = 1
        scheme     = ''
        server     = <socket.socket fd=20, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 45199)>
        server_port = 45199
        server_socket_thread = <function server_socket.<locals>.server_socket_thread at 0x7f6c66517af0>
        tick       = <function server_socket.<locals>.tick at 0x7f6c66517820>
        timeout    = 5
        tls        = '/home/tkloczko/rpmbuild/BUILD/httplib2-0.19.1/tests/tls/server_chain.pem'
        tls_skip_errors = ['TLSV1_ALERT_UNKNOWN_CA']
________________________________________________________________________ test_client_cert_verified _________________________________________________________________________
tests/test_https.py:140: in test_client_cert_verified
    with tests.server_request(handler, tls=setup_tls) as uri:
        cert_log   = []
        handler    = <function test_client_cert_verified.<locals>.handler at 0x7f6c661290d0>
        http       = <httplib2.Http object at 0x7f6c654e7b80>
        setup_tls  = <function test_client_cert_verified.<locals>.setup_tls at 0x7f6c66517d30>
/usr/lib64/python3.8/contextlib.py:113: in __enter__
    return next(self.gen)
        self       = <contextlib._GeneratorContextManager object at 0x7f6c654e7760>
tests/__init__.py:342: in server_socket
    context.load_cert_chain(SERVER_CHAIN)
E   ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
        bind_hostname = 'localhost'
        context    = <ssl.SSLContext object at 0x7f6c6649ee40>
        fun        = <function server_request.<locals>.server_request_socket_handler at 0x7f6c66129160>
        gcounter   = [0]
        gresult    = [None]
        request_count = 1
        scheme     = ''
        server     = <socket.socket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 47721)>
        server_port = 47721
        server_socket_thread = <function server_socket.<locals>.server_socket_thread at 0x7f6c66129280>
        tick       = <function server_socket.<locals>.tick at 0x7f6c661291f0>
        timeout    = 5
        tls        = <function test_client_cert_verified.<locals>.setup_tls at 0x7f6c66517d30>
        tls_skip_errors = ['TLSV1_ALERT_UNKNOWN_CA']
____________________________________________________________________ test_client_cert_password_verified ____________________________________________________________________
tests/test_https.py:163: in test_client_cert_password_verified
    with tests.server_request(handler, tls=setup_tls) as uri:
        cert_log   = []
        handler    = <function test_client_cert_password_verified.<locals>.handler at 0x7f6c66129790>
        http       = <httplib2.Http object at 0x7f6c654dec40>
        setup_tls  = <function test_client_cert_password_verified.<locals>.setup_tls at 0x7f6c66129310>
/usr/lib64/python3.8/contextlib.py:113: in __enter__
    return next(self.gen)
        self       = <contextlib._GeneratorContextManager object at 0x7f6c654de760>
tests/__init__.py:342: in server_socket
    context.load_cert_chain(SERVER_CHAIN)
E   ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
        bind_hostname = 'localhost'
        context    = <ssl.SSLContext object at 0x7f6c661217c0>
        fun        = <function server_request.<locals>.server_request_socket_handler at 0x7f6c66129820>
        gcounter   = [0]
        gresult    = [None]
        request_count = 1
        scheme     = ''
        server     = <socket.socket fd=23, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 38969)>
        server_port = 38969
        server_socket_thread = <function server_socket.<locals>.server_socket_thread at 0x7f6c66129940>
        tick       = <function server_socket.<locals>.tick at 0x7f6c661298b0>
        timeout    = 5
        tls        = <function test_client_cert_password_verified.<locals>.setup_tls at 0x7f6c66129310>
        tls_skip_errors = ['TLSV1_ALERT_UNKNOWN_CA']
_____________________________________________________________________ test_sni_set_servername_callback _____________________________________________________________________
tests/test_https.py:186: in test_sni_set_servername_callback
    with tests.server_const_http(tls=setup_tls) as uri:
        http       = <httplib2.Http object at 0x7f6c6655cca0>
        setup_tls  = <function test_sni_set_servername_callback.<locals>.setup_tls at 0x7f6c661299d0>
        sni_log    = []
/usr/lib64/python3.8/contextlib.py:113: in __enter__
    return next(self.gen)
        self       = <contextlib._GeneratorContextManager object at 0x7f6c6655ce80>
tests/__init__.py:342: in server_socket
    context.load_cert_chain(SERVER_CHAIN)
E   ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
        bind_hostname = 'localhost'
        context    = <ssl.SSLContext object at 0x7f6c661216c0>
        fun        = <function server_request.<locals>.server_request_socket_handler at 0x7f6c66129ee0>
        gcounter   = [0]
        gresult    = [None]
        request_count = 1
        scheme     = ''
        server     = <socket.socket fd=24, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 45185)>
        server_port = 45185
        server_socket_thread = <function server_socket.<locals>.server_socket_thread at 0x7f6c66136040>
        tick       = <function server_socket.<locals>.tick at 0x7f6c66129f70>
        timeout    = 5
        tls        = <function test_sni_set_servername_callback.<locals>.setup_tls at 0x7f6c661299d0>
        tls_skip_errors = ['TLSV1_ALERT_UNKNOWN_CA']
________________________________________________________ test_server_not_found_error_is_raised_for_invalid_hostname ________________________________________________________
/usr/lib/python3.8/site-packages/socks.py:787: in connect
    super(socksocket, self).connect(proxy_addr)
        __class__  = <class 'socks.socksocket'>
        catch_errors = None
        dest_addr  = 'invalid.hostname.foo.bar'
        dest_pair  = ('invalid.hostname.foo.bar', 80)
        dest_port  = 80
        msg        = 'Error connecting to HTTP proxy 255.255.255.255:8001'
        password   = None
        printable_type = 'HTTP'
        proxy_addr = '255.255.255.255'
        proxy_port = 8001
        proxy_server = '255.255.255.255:8001'
        proxy_type = 3
        rdns       = True
        self       = <socks.socksocket [closed] fd=-1, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>
        username   = None
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
    return self._mock_call(*args, **kwargs)
        args       = (('255.255.255.255', 8001),)
        kwargs     = {}
        self       = <MagicMock name='connect' spec='method_descriptor' id='140110397439520'>
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
    return self._execute_mock_call(*args, **kwargs)
        args       = (('255.255.255.255', 8001),)
        kwargs     = {}
        self       = <MagicMock name='connect' spec='method_descriptor' id='140110397439520'>
/usr/lib64/python3.8/unittest/mock.py:1146: in _execute_mock_call
    result = effect(*args, **kwargs)
        args       = (('255.255.255.255', 8001),)
        effect     = <function _raise_name_not_known_error at 0x7f6c66356ee0>
        kwargs     = {}
        self       = <MagicMock name='connect' spec='method_descriptor' id='140110397439520'>
tests/test_proxy.py:24: in _raise_name_not_known_error
    raise socket.gaierror(socket.EAI_NONAME, "Name or service not known")
E   socket.gaierror: [Errno -2] Name or service not known
        args       = (('255.255.255.255', 8001),)
        kwargs     = {}

During handling of the above exception, another exception occurred:
../../BUILDROOT/python-httplib2-0.19.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/httplib2/__init__.py:1349: in _conn_request
    conn.connect()
        body       = None
        conn       = <httplib2.HTTPConnectionWithTimeout object at 0x7f6c6642b790>
        headers    = {'accept-encoding': 'gzip, deflate', 'user-agent': 'Python-httplib2/0.19.1 (gzip)'}
        i          = 1
        method     = 'GET'
        request_uri = '/'
        seen_bad_status_line = False
        self       = <httplib2.Http object at 0x7f6c654e7df0>
../../BUILDROOT/python-httplib2-0.19.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/httplib2/__init__.py:1049: in connect
    raise socket_err
        af         = <AddressFamily.AF_INET: 2>
        canonname  = ''
        host       = '255.255.255.255'
        port       = 8001
        proto      = 6
        proxy_headers = None
        proxy_host = '255.255.255.255'
        proxy_pass = None
        proxy_port = 8001
        proxy_rdns = True
        proxy_type = 3
        proxy_user = None
        res        = (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('255.255.255.255', 8001))
        sa         = ('255.255.255.255', 8001)
        self       = <httplib2.HTTPConnectionWithTimeout object at 0x7f6c6642b790>
        socket_err = ProxyConnectionError()
        socktype   = <SocketKind.SOCK_STREAM: 1>
        use_proxy  = True
../../BUILDROOT/python-httplib2-0.19.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/httplib2/__init__.py:1032: in connect
    self.sock.connect((self.host, self.port) + sa[2:])
        af         = <AddressFamily.AF_INET: 2>
        canonname  = ''
        host       = '255.255.255.255'
        port       = 8001
        proto      = 6
        proxy_headers = None
        proxy_host = '255.255.255.255'
        proxy_pass = None
        proxy_port = 8001
        proxy_rdns = True
        proxy_type = 3
        proxy_user = None
        res        = (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('255.255.255.255', 8001))
        sa         = ('255.255.255.255', 8001)
        self       = <httplib2.HTTPConnectionWithTimeout object at 0x7f6c6642b790>
        socket_err = ProxyConnectionError()
        socktype   = <SocketKind.SOCK_STREAM: 1>
        use_proxy  = True
/usr/lib/python3.8/site-packages/socks.py:47: in wrapper
    return function(*args, **kwargs)
        _is_blocking = None
        args       = (<socks.socksocket [closed] fd=-1, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>, ('invalid.hostname.foo.bar', 80))
        function   = <function socksocket.connect at 0x7f6dfc1b4e50>
        kwargs     = {}
        self       = <socks.socksocket [closed] fd=-1, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>
/usr/lib/python3.8/site-packages/socks.py:800: in connect
    raise ProxyConnectionError(msg, error)
E   socks.ProxyConnectionError: Error connecting to HTTP proxy 255.255.255.255:8001: [Errno -2] Name or service not known
        __class__  = <class 'socks.socksocket'>
        catch_errors = None
        dest_addr  = 'invalid.hostname.foo.bar'
        dest_pair  = ('invalid.hostname.foo.bar', 80)
        dest_port  = 80
        msg        = 'Error connecting to HTTP proxy 255.255.255.255:8001'
        password   = None
        printable_type = 'HTTP'
        proxy_addr = '255.255.255.255'
        proxy_port = 8001
        proxy_server = '255.255.255.255:8001'
        proxy_type = 3
        rdns       = True
        self       = <socks.socksocket [closed] fd=-1, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>
        username   = None

During handling of the above exception, another exception occurred:
tests/test_proxy.py:119: in test_server_not_found_error_is_raised_for_invalid_hostname
    http.request("http://invalid.hostname.foo.bar/", "GET")
        http       = <httplib2.Http object at 0x7f6c654e7df0>
        mock_socket_connect = <MagicMock name='connect' spec='method_descriptor' id='140110397439520'>
../../BUILDROOT/python-httplib2-0.19.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/httplib2/__init__.py:1711: in request
    (response, content) = self._request(
        authority  = 'invalid.hostname.foo.bar'
        body       = None
        cached_value = None
        cachekey   = None
        cc         = {}
        certs      = []
        conn       = <httplib2.HTTPConnectionWithTimeout object at 0x7f6c6642b790>
        conn_key   = 'http:invalid.hostname.foo.bar'
        connection_type = <class 'httplib2.HTTPConnectionWithTimeout'>
        defrag_uri = 'http://invalid.hostname.foo.bar/'
        headers    = {'accept-encoding': 'gzip, deflate', 'user-agent': 'Python-httplib2/0.19.1 (gzip)'}
        info       = <email.message.Message object at 0x7f6c6642b0d0>
        is_timeout = False
        method     = 'GET'
        redirections = 5
        request_uri = '/'
        scheme     = 'http'
        self       = <httplib2.Http object at 0x7f6c654e7df0>
        uri        = 'http://invalid.hostname.foo.bar/'
../../BUILDROOT/python-httplib2-0.19.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/httplib2/__init__.py:1427: in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
        absolute_uri = 'http://invalid.hostname.foo.bar/'
        auth       = None
        auths      = []
        body       = None
        cachekey   = None
        conn       = <httplib2.HTTPConnectionWithTimeout object at 0x7f6c6642b790>
        headers    = {'accept-encoding': 'gzip, deflate', 'user-agent': 'Python-httplib2/0.19.1 (gzip)'}
        host       = 'invalid.hostname.foo.bar'
        method     = 'GET'
        redirections = 5
        request_uri = '/'
        self       = <httplib2.Http object at 0x7f6c654e7df0>
../../BUILDROOT/python-httplib2-0.19.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/httplib2/__init__.py:1358: in _conn_request
    errno_ = e.args[0].errno if isinstance(e.args[0], socket.error) else e.errno
E   IndexError: tuple index out of range
        body       = None
        conn       = <httplib2.HTTPConnectionWithTimeout object at 0x7f6c6642b790>
        headers    = {'accept-encoding': 'gzip, deflate', 'user-agent': 'Python-httplib2/0.19.1 (gzip)'}
        i          = 1
        method     = 'GET'
        request_uri = '/'
        seen_bad_status_line = False
        self       = <httplib2.Http object at 0x7f6c654e7df0>
_____________________________________________________________________________ test_socks5_auth _____________________________________________________________________________
tests/test_proxy.py:177: in test_socks5_auth
    with tests.assert_raises(httplib2.socks.Socks5AuthError):
E   AttributeError: module 'socks' has no attribute 'Socks5AuthError'
        http       = <httplib2.Http object at 0x7f6c6569a100>
        proxy_conn = <function test_socks5_auth.<locals>.proxy_conn at 0x7f6c66136310>
        proxy_info = <ProxyInfo type=2 host:port=localhost:38257 rdns=True user=user_str headers=None>
        uri        = 'http://localhost:38257/'
        uri_parsed = ParseResult(scheme='http', netloc='localhost:38257', path='/', params='', query='', fragment='')
____________________________________________________________________ test_functional_noproxy_star_https ____________________________________________________________________
tests/test_proxy.py:205: in test_functional_noproxy_star_https
    with tests.server_request(handler, tls=True) as uri:
        handler    = <function test_functional_noproxy_star_https.<locals>.handler at 0x7f6c656bc670>
        monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f6c654f1520>
/usr/lib64/python3.8/contextlib.py:113: in __enter__
    return next(self.gen)
        self       = <contextlib._GeneratorContextManager object at 0x7f6c654f1b80>
tests/__init__.py:345: in server_socket
    context.load_cert_chain(tls)
E   ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
        bind_hostname = 'localhost'
        context    = <ssl.SSLContext object at 0x7f6c656da9c0>
        fun        = <function server_request.<locals>.server_request_socket_handler at 0x7f6c656bcc10>
        gcounter   = [0]
        gresult    = [None]
        request_count = 1
        scheme     = ''
        server     = <socket.socket fd=26, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 54959)>
        server_port = 54959
        server_socket_thread = <function server_socket.<locals>.server_socket_thread at 0x7f6c656bcd30>
        tick       = <function server_socket.<locals>.tick at 0x7f6c656bcca0>
        timeout    = 5
        tls        = '/home/tkloczko/rpmbuild/BUILD/httplib2-0.19.1/tests/tls/server_chain.pem'
        tls_skip_errors = ['TLSV1_ALERT_UNKNOWN_CA']
============================================================================= warnings summary =============================================================================
../../../../../usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1183
  /usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1183: PytestDeprecationWarning: The --strict option is deprecated, use --strict-markers instead.
    self.issue_config_time_warning(

-- Docs: https://docs.pytest.org/en/stable/warnings.html

----------- coverage: platform linux, python 3.8.9-final-0 -----------
Name                                                                                                                          Stmts   Miss  Cover
-------------------------------------------------------------------------------------------------------------------------------------------------
/home/tkloczko/rpmbuild/BUILDROOT/python-httplib2-0.19.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/httplib2/__init__.py     916    163    82%
/home/tkloczko/rpmbuild/BUILDROOT/python-httplib2-0.19.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/httplib2/auth.py          36      3    92%
/home/tkloczko/rpmbuild/BUILDROOT/python-httplib2-0.19.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/httplib2/certs.py         30      4    87%
/home/tkloczko/rpmbuild/BUILDROOT/python-httplib2-0.19.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/httplib2/error.py         25      0   100%
/home/tkloczko/rpmbuild/BUILDROOT/python-httplib2-0.19.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/httplib2/iri2uri.py       41     15    63%
/home/tkloczko/rpmbuild/BUILDROOT/python-httplib2-0.19.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/httplib2/socks.py        244    244     0%
-------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                                                                                          1292    429    67%

========================================================================= short test summary info ==========================================================================
SKIPPED [4] tests/test_auth.py:249: benchmark disabled by default, set env httplib2_test_bench=1
SKIPPED [1] tests/test_cache.py:48: was commented in legacy code
SKIPPED [1] tests/test_http.py:253: FIXME: timeout on Travis py27 and pypy, works elsewhere
SKIPPED [1] tests/test_http.py:404: FIXME: timeout on Travis py27 and pypy, works elsewhere
SKIPPED [1] tests/test_http.py:557: was commented in legacy code
XFAIL tests/test_http.py::test_get_301_no_redirect
  FIXME: 301 cache works only with follow_redirects, should work regardless
XPASS tests/test_other.py::test_timeout_global FIXME: for unknown reason global timeout test fails in Python3 with response 200
FAILED tests/test_https.py::test_get_via_https - ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
FAILED tests/test_https.py::test_get_301_via_https - ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
FAILED tests/test_https.py::test_get_301_via_https_spec_violation_on_location - ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
FAILED tests/test_https.py::test_invalid_ca_certs_path - ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
FAILED tests/test_https.py::test_not_trusted_ca - ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
FAILED tests/test_https.py::test_min_tls_version - ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
FAILED tests/test_https.py::test_max_tls_version - ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
FAILED tests/test_https.py::test_client_cert_verified - ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
FAILED tests/test_https.py::test_client_cert_password_verified - ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
FAILED tests/test_https.py::test_sni_set_servername_callback - ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
FAILED tests/test_proxy.py::test_server_not_found_error_is_raised_for_invalid_hostname - IndexError: tuple index out of range
FAILED tests/test_proxy.py::test_socks5_auth - AttributeError: module 'socks' has no attribute 'Socks5AuthError'
FAILED tests/test_proxy.py::test_functional_noproxy_star_https - ssl.SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4029)
=============================================== 13 failed, 176 passed, 8 skipped, 1 xfailed, 1 xpassed, 1 warning in 12.07s ================================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions