running test WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox. running egg_info creating proxy.py.egg-info writing proxy.py.egg-info/PKG-INFO writing dependency_links to proxy.py.egg-info/dependency_links.txt writing entry points to proxy.py.egg-info/entry_points.txt writing requirements to proxy.py.egg-info/requires.txt writing top-level names to proxy.py.egg-info/top_level.txt writing manifest file 'proxy.py.egg-info/SOURCES.txt' reading manifest file 'proxy.py.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'proxy.py.egg-info/SOURCES.txt' running build_ext tunnel (unittest.loader._FailedTest) ... ERROR test_set_open_file_limit (tests.test_set_open_file_limit.TestSetOpenFileLimit) ... 2022-02-03 00:31:25,292 - pid:1968 [D] set_open_file_limit:417 - Open file soft limit set to 256 ok test_set_open_file_limit_not_called (tests.test_set_open_file_limit.TestSetOpenFileLimit) ... ok test_set_open_file_limit_not_called_coz_upper_bound_check (tests.test_set_open_file_limit.TestSetOpenFileLimit) ... ok 2022-02-03 00:31:25,304 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:25,304 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:25,306 - pid:1968 [I] listen:113 - Listening on 0.0.0.0:32965 2022-02-03 00:31:25,308 - pid:1968 [D] start_workers:130 - Started acceptor#0 process 1975 2022-02-03 00:31:25,309 - pid:1968 [I] start_workers:136 - Started 1 workers 2022-02-03 00:31:25,315 - pid:1975 [D] start_threadless_process:91 - Started process 1977 /build/python-proxy.py/src/proxy.py-2.3.1/proxy/core/acceptor/threadless.py:173: DeprecationWarning: There is no current event loop self.loop = asyncio.get_event_loop() 2022-02-03 00:31:25,320 - pid:1977 [D] __init__:59 - Using selector: EpollSelector test_proxy_no_vcr (tests.testing.test_embed.TestProxyPyEmbedded) ... 2022-02-03 00:31:25,332 - pid:1977 [D] initialize:104 - Handling connection 2022-02-03 00:31:25,334 - pid:1977 [D] initialize:104 - Handling connection 2022-02-03 00:31:25,335 - pid:1977 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:25,335 - pid:1977 [D] handle_readables:269 - Client closed connection, tearing down... 2022-02-03 00:31:25,337 - pid:1977 [I] access_log:241 - 127.0.0.1:40020 - None None - 5.22 ms 2022-02-03 00:31:25,337 - pid:1977 [D] shutdown:173 - Closing client connection at address ('127.0.0.1', 40020) has buffer False 2022-02-03 00:31:25,337 - pid:1977 [D] shutdown:184 - Client connection shutdown successful 2022-02-03 00:31:25,337 - pid:1977 [D] shutdown:189 - Client connection closed 2022-02-03 00:31:25,338 - pid:1977 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:25,338 - pid:1977 [D] recv:63 - received 141 bytes from client 2022-02-03 00:31:25,340 - pid:1977 [D] connect_upstream:415 - Connecting to upstream localhost:32965 2022-02-03 00:31:25,357 - pid:1977 [D] connect_upstream:420 - Connected to upstream localhost:32965 2022-02-03 00:31:25,359 - pid:1977 [D] initialize:104 - Handling connection 2022-02-03 00:31:25,359 - pid:1977 [D] write_to_descriptors:157 - Server is write ready, flushing buffer 2022-02-03 00:31:25,359 - pid:1977 [D] flush:92 - flushed 145 bytes to server 2022-02-03 00:31:25,360 - pid:1977 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:25,360 - pid:1977 [D] recv:63 - received 145 bytes from client 2022-02-03 00:31:25,361 - pid:1977 [D] flush:92 - flushed 70 bytes to client 2022-02-03 00:31:25,361 - pid:1977 [I] access_log:241 - 127.0.0.1:40024 - GET / - 2.65 ms 2022-02-03 00:31:25,361 - pid:1977 [D] shutdown:173 - Closing client connection at address ('127.0.0.1', 40024) has buffer False 2022-02-03 00:31:25,362 - pid:1977 [D] shutdown:184 - Client connection shutdown successful 2022-02-03 00:31:25,362 - pid:1977 [D] shutdown:189 - Client connection closed 2022-02-03 00:31:25,362 - pid:1977 [D] read_from_descriptors:179 - Server is ready for reads, reading... 2022-02-03 00:31:25,362 - pid:1977 [D] recv:63 - received 70 bytes from server 2022-02-03 00:31:25,363 - pid:1977 [D] handle_writables:226 - Client is ready for writes, flushing buffer 2022-02-03 00:31:25,363 - pid:1977 [D] flush:92 - flushed 70 bytes to client 2022-02-03 00:31:25,363 - pid:1977 [D] read_from_descriptors:179 - Server is ready for reads, reading... 2022-02-03 00:31:25,364 - pid:1977 [D] read_from_descriptors:208 - Server closed connection, tearing down... 2022-02-03 00:31:25,364 - pid:1977 [I] access_log:399 - 127.0.0.1:40022 - GET localhost:32965/ - 404 NOT FOUND - 70 bytes - 29.49 ms 2022-02-03 00:31:25,364 - pid:1977 [I] close:59 - Cached response at /tmp/localhost-7b613989eb4c4b698b2386bad3c6e7cc.txt 2022-02-03 00:31:25,364 - pid:1977 [D] on_client_connection_close:262 - Closed server connection, has buffer False 2022-02-03 00:31:25,365 - pid:1977 [D] shutdown:173 - Closing client connection at address ('127.0.0.1', 40022) has buffer False 2022-02-03 00:31:25,365 - pid:1977 [D] shutdown:184 - Client connection shutdown successful 2022-02-03 00:31:25,365 - pid:1977 [D] shutdown:189 - Client connection closed ok test_proxy_vcr (tests.testing.test_embed.TestProxyPyEmbedded) With VCR enabled, proxy.py will cache responses for all HTTP(s) ... 2022-02-03 00:31:25,371 - pid:1977 [D] initialize:104 - Handling connection 2022-02-03 00:31:25,372 - pid:1977 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:25,372 - pid:1977 [D] recv:63 - received 141 bytes from client 2022-02-03 00:31:25,373 - pid:1977 [D] connect_upstream:415 - Connecting to upstream localhost:32965 2022-02-03 00:31:25,373 - pid:1977 [D] connect_upstream:420 - Connected to upstream localhost:32965 2022-02-03 00:31:25,374 - pid:1977 [D] initialize:104 - Handling connection 2022-02-03 00:31:25,375 - pid:1977 [D] write_to_descriptors:157 - Server is write ready, flushing buffer 2022-02-03 00:31:25,375 - pid:1977 [D] flush:92 - flushed 145 bytes to server 2022-02-03 00:31:25,375 - pid:1977 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:25,376 - pid:1977 [D] recv:63 - received 145 bytes from client 2022-02-03 00:31:25,376 - pid:1977 [D] flush:92 - flushed 70 bytes to client 2022-02-03 00:31:25,377 - pid:1977 [I] access_log:241 - 127.0.0.1:40028 - GET / - 2.21 ms 2022-02-03 00:31:25,377 - pid:1977 [D] shutdown:173 - Closing client connection at address ('127.0.0.1', 40028) has buffer False 2022-02-03 00:31:25,377 - pid:1977 [D] shutdown:184 - Client connection shutdown successful 2022-02-03 00:31:25,377 - pid:1977 [D] shutdown:189 - Client connection closed 2022-02-03 00:31:25,378 - pid:1977 [D] read_from_descriptors:179 - Server is ready for reads, reading... 2022-02-03 00:31:25,378 - pid:1977 [D] recv:63 - received 70 bytes from server 2022-02-03 00:31:25,378 - pid:1977 [D] handle_writables:226 - Client is ready for writes, flushing buffer 2022-02-03 00:31:25,379 - pid:1977 [D] flush:92 - flushed 70 bytes to client 2022-02-03 00:31:25,379 - pid:1977 [D] read_from_descriptors:179 - Server is ready for reads, reading... 2022-02-03 00:31:25,379 - pid:1977 [D] read_from_descriptors:208 - Server closed connection, tearing down... ok 2022-02-03 00:31:25,379 - pid:1977 [I] access_log:399 - 127.0.0.1:40026 - GET localhost:32965/ - 404 NOT FOUND - 70 bytes - 8.00 ms test_with_proxy (tests.testing.test_embed.TestProxyPyEmbedded) Makes a HTTP request to in-build web server via proxy server. ... 2022-02-03 00:31:25,379 - pid:1977 [I] close:59 - Cached response at /tmp/localhost-d8c7b4c3a441453e902ba284afdbdbbe.txt 2022-02-03 00:31:25,380 - pid:1977 [D] on_client_connection_close:262 - Closed server connection, has buffer False 2022-02-03 00:31:25,380 - pid:1977 [D] shutdown:173 - Closing client connection at address ('127.0.0.1', 40026) has buffer False 2022-02-03 00:31:25,380 - pid:1977 [D] shutdown:184 - Client connection shutdown successful 2022-02-03 00:31:25,380 - pid:1977 [D] shutdown:189 - Client connection closed 2022-02-03 00:31:25,381 - pid:1977 [D] initialize:104 - Handling connection 2022-02-03 00:31:25,381 - pid:1977 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:25,381 - pid:1977 [D] recv:63 - received 63 bytes from client 2022-02-03 00:31:25,382 - pid:1977 [D] connect_upstream:415 - Connecting to upstream localhost:32965 2022-02-03 00:31:25,382 - pid:1977 [D] connect_upstream:420 - Connected to upstream localhost:32965 2022-02-03 00:31:25,383 - pid:1977 [D] initialize:104 - Handling connection 2022-02-03 00:31:25,384 - pid:1977 [D] write_to_descriptors:157 - Server is write ready, flushing buffer 2022-02-03 00:31:25,384 - pid:1977 [D] flush:92 - flushed 67 bytes to server 2022-02-03 00:31:25,384 - pid:1977 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:25,385 - pid:1977 [D] recv:63 - received 67 bytes from client 2022-02-03 00:31:25,385 - pid:1977 [D] flush:92 - flushed 70 bytes to client 2022-02-03 00:31:25,385 - pid:1977 [I] access_log:241 - 127.0.0.1:40032 - GET / - 2.18 ms 2022-02-03 00:31:25,386 - pid:1977 [D] shutdown:173 - Closing client connection at address ('127.0.0.1', 40032) has buffer False 2022-02-03 00:31:25,386 - pid:1977 [D] shutdown:184 - Client connection shutdown successful 2022-02-03 00:31:25,386 - pid:1977 [D] shutdown:189 - Client connection closed 2022-02-03 00:31:25,386 - pid:1977 [D] read_from_descriptors:179 - Server is ready for reads, reading... 2022-02-03 00:31:25,387 - pid:1977 [D] recv:63 - received 70 bytes from server 2022-02-03 00:31:25,387 - pid:1977 [D] handle_writables:226 - Client is ready for writes, flushing buffer 2022-02-03 00:31:25,387 - pid:1977 [D] flush:92 - flushed 70 bytes to client 2022-02-03 00:31:25,388 - pid:1977 [D] read_from_descriptors:179 - Server is ready for reads, reading... 2022-02-03 00:31:25,388 - pid:1977 [D] read_from_descriptors:208 - Server closed connection, tearing down... ok 2022-02-03 00:31:25,388 - pid:1977 [I] access_log:399 - 127.0.0.1:40030 - GET localhost:32965/ - 404 NOT FOUND - 70 bytes - 7.41 ms 2022-02-03 00:31:25,388 - pid:1968 [I] shutdown:153 - Shutting down 1 workers 2022-02-03 00:31:25,388 - pid:1977 [I] close:59 - Cached response at /tmp/localhost-909a24b2d60b428b8f98c0f394d391f8.txt 2022-02-03 00:31:25,388 - pid:1977 [D] on_client_connection_close:262 - Closed server connection, has buffer False 2022-02-03 00:31:25,389 - pid:1977 [D] shutdown:173 - Closing client connection at address ('127.0.0.1', 40030) has buffer False 2022-02-03 00:31:25,389 - pid:1977 [D] shutdown:184 - Client connection shutdown successful 2022-02-03 00:31:25,389 - pid:1977 [D] shutdown:189 - Client connection closed 2022-02-03 00:31:26,384 - pid:1975 [D] shutdown_threadless_process:95 - Stopped process 1977 2022-02-03 00:31:26,393 - pid:1975 [D] run:157 - Acceptor#0 shutdown 2022-02-03 00:31:26,396 - pid:1968 [D] shutdown:166 - Acceptors shutdown test_wait_for_server (tests.testing.test_test_case.TestTestCase) ... ok test_basic_auth (tests.test_main.TestMain) ... 2022-02-03 00:31:27,420 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.AuthPlugin 2022-02-03 00:31:27,421 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:27,424 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.AuthPlugin 2022-02-03 00:31:27,425 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin ok test_init_with_no_arguments (tests.test_main.TestMain) ... 1968ok test_main_py2_exit (tests.test_main.TestMain) ... ok test_main_py3_runs (tests.test_main.TestMain) ... 2022-02-03 00:31:27,487 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.AuthPlugin 2022-02-03 00:31:27,488 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin ok test_main_version (tests.test_main.TestMain) ... ok test_pid_file_is_written_and_removed (tests.test_main.TestMain) ... 2022-02-03 00:31:27,524 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:27,525 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.dashboard.dashboard.ProxyDashboard 2022-02-03 00:31:27,525 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.dashboard.inspect_traffic.InspectTrafficPlugin 2022-02-03 00:31:27,526 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.inspector.DevtoolsProtocolPlugin 2022-02-03 00:31:27,526 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin ok test_man_in_the_middle_plugin (tests.plugin.test_http_proxy_plugins_with_tls_interception.TestHttpProxyPluginExamplesWithTlsInterception) ... 2022-02-03 00:31:27,590 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:27,606 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:27,642 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:27,643 - pid:1968 [D] recv:63 - received 33 bytes from client 2022-02-03 00:31:27,645 - pid:1968 [D] connect_upstream:415 - Connecting to upstream uni.corn:443 2022-02-03 00:31:27,649 - pid:1968 [D] connect_upstream:420 - Connected to upstream uni.corn:443 2022-02-03 00:31:27,674 - pid:1968 [D] gen_ca_signed_certificate:472 - Generating public key /build/.proxy/certificates/uni.corn.pub 2022-02-03 00:31:27,676 - pid:1968 [D] gen_ca_signed_certificate:483 - Generating CSR /build/.proxy/certificates/uni.corn.csr 2022-02-03 00:31:27,676 - pid:1968 [D] gen_ca_signed_certificate:495 - Signing CSR /build/.proxy/certificates/uni.corn.pem 2022-02-03 00:31:27,678 - pid:1968 [D] flush:92 - flushed 39 bytes to client 2022-02-03 00:31:27,682 - pid:1968 [D] wrap_client:560 - TLS interception using /build/.proxy/certificates/uni.corn.pem 2022-02-03 00:31:27,682 - pid:1968 [D] handle_readables:300 - Updated client conn to 2022-02-03 00:31:27,755 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:27,756 - pid:1968 [D] recv:63 - received 34 bytes from client 2022-02-03 00:31:27,765 - pid:1968 [D] write_to_descriptors:157 - Server is write ready, flushing buffer 2022-02-03 00:31:27,777 - pid:1968 [D] read_from_descriptors:179 - Server is ready for reads, reading... ok test_modify_post_data_plugin (tests.plugin.test_http_proxy_plugins_with_tls_interception.TestHttpProxyPluginExamplesWithTlsInterception) ... 2022-02-03 00:31:27,794 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:27,807 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:27,841 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:27,842 - pid:1968 [D] recv:63 - received 33 bytes from client 2022-02-03 00:31:27,843 - pid:1968 [D] connect_upstream:415 - Connecting to upstream uni.corn:443 2022-02-03 00:31:27,850 - pid:1968 [D] connect_upstream:420 - Connected to upstream uni.corn:443 2022-02-03 00:31:27,871 - pid:1968 [D] gen_ca_signed_certificate:472 - Generating public key /build/.proxy/certificates/uni.corn.pub 2022-02-03 00:31:27,872 - pid:1968 [D] gen_ca_signed_certificate:483 - Generating CSR /build/.proxy/certificates/uni.corn.csr 2022-02-03 00:31:27,872 - pid:1968 [D] gen_ca_signed_certificate:495 - Signing CSR /build/.proxy/certificates/uni.corn.pem 2022-02-03 00:31:27,873 - pid:1968 [D] flush:92 - flushed 39 bytes to client 2022-02-03 00:31:27,878 - pid:1968 [D] wrap_client:560 - TLS interception using /build/.proxy/certificates/uni.corn.pem 2022-02-03 00:31:27,878 - pid:1968 [D] handle_readables:300 - Updated client conn to 2022-02-03 00:31:27,905 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:27,905 - pid:1968 [D] recv:63 - received 120 bytes from client ok test_filter_by_upstream_host_plugin (tests.plugin.test_http_proxy_plugins.TestHttpProxyPluginExamples) ... 2022-02-03 00:31:27,916 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:27,925 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:27,939 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:27,939 - pid:1968 [D] recv:63 - received 53 bytes from client 2022-02-03 00:31:27,940 - pid:1968 [D] handle_readables:309 - HttpProtocolException type raised ok test_filter_by_url_regex_plugin (tests.plugin.test_http_proxy_plugins.TestHttpProxyPluginExamples) ... 2022-02-03 00:31:27,950 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:27,962 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:27,976 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:27,977 - pid:1968 [D] recv:63 - received 68 bytes from client 2022-02-03 00:31:27,979 - pid:1968 [D] connect_upstream:415 - Connecting to upstream www.facebook.com:80 2022-02-03 00:31:27,989 - pid:1968 [D] connect_upstream:420 - Connected to upstream www.facebook.com:80 2022-02-03 00:31:27,995 - pid:1968 [I] handle_client_request:110 - Blocked: 'www.facebook.com/tr/' with status_code '404' by rule number '5' 2022-02-03 00:31:27,996 - pid:1968 [D] handle_readables:309 - HttpProtocolException type raised ok test_man_in_the_middle_plugin (tests.plugin.test_http_proxy_plugins.TestHttpProxyPluginExamples) ... 2022-02-03 00:31:28,005 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:28,016 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:28,039 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:28,040 - pid:1968 [D] recv:63 - received 57 bytes from client 2022-02-03 00:31:28,041 - pid:1968 [D] connect_upstream:415 - Connecting to upstream super.secure:80 2022-02-03 00:31:28,045 - pid:1968 [D] connect_upstream:420 - Connected to upstream super.secure:80 2022-02-03 00:31:28,070 - pid:1968 [D] write_to_descriptors:157 - Server is write ready, flushing buffer 2022-02-03 00:31:28,081 - pid:1968 [D] read_from_descriptors:179 - Server is ready for reads, reading... ok test_modify_post_data_plugin (tests.plugin.test_http_proxy_plugins.TestHttpProxyPluginExamples) ... 2022-02-03 00:31:28,088 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:28,098 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:28,111 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:28,112 - pid:1968 [D] recv:63 - received 145 bytes from client 2022-02-03 00:31:28,115 - pid:1968 [D] connect_upstream:415 - Connecting to upstream httpbin.org:80 2022-02-03 00:31:28,125 - pid:1968 [D] connect_upstream:420 - Connected to upstream httpbin.org:80 ok test_proposed_rest_api_plugin (tests.plugin.test_http_proxy_plugins.TestHttpProxyPluginExamples) ... 2022-02-03 00:31:28,144 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:28,155 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:28,169 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:28,170 - pid:1968 [D] recv:63 - received 72 bytes from client ok test_redirect_to_custom_server_plugin (tests.plugin.test_http_proxy_plugins.TestHttpProxyPluginExamples) ... 2022-02-03 00:31:28,185 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:28,195 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:28,209 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:28,210 - pid:1968 [D] recv:63 - received 58 bytes from client 2022-02-03 00:31:28,213 - pid:1968 [D] connect_upstream:415 - Connecting to upstream localhost:8899 2022-02-03 00:31:28,223 - pid:1968 [D] connect_upstream:420 - Connected to upstream localhost:8899 ok test_load_plugin_from_args (tests.common.test_flags.TestFlags) ... 2022-02-03 00:31:28,239 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:28,240 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.plugin.CacheResponsesPlugin ok test_load_plugin_from_bytes (tests.common.test_flags.TestFlags) ... 2022-02-03 00:31:28,242 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:28,243 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.plugin.CacheResponsesPlugin ok test_load_plugin_from_class (tests.common.test_flags.TestFlags) ... 2022-02-03 00:31:28,246 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:28,246 - pid:1968 [I] load_plugins:334 - Loaded plugin __main__.CacheResponsesPlugin ok test_load_plugins_from_args (tests.common.test_flags.TestFlags) ... 2022-02-03 00:31:28,249 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:28,250 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.plugin.CacheResponsesPlugin 2022-02-03 00:31:28,251 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.plugin.FilterByUpstreamHostPlugin ok test_load_plugins_from_bytes (tests.common.test_flags.TestFlags) ... 2022-02-03 00:31:28,253 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:28,254 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.plugin.CacheResponsesPlugin 2022-02-03 00:31:28,254 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.plugin.FilterByUpstreamHostPlugin ok test_load_plugins_from_bytes_and_class (tests.common.test_flags.TestFlags) ... 2022-02-03 00:31:28,257 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:28,258 - pid:1968 [I] load_plugins:334 - Loaded plugin __main__.CacheResponsesPlugin 2022-02-03 00:31:28,258 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.plugin.FilterByUpstreamHostPlugin ok test_load_plugins_from_class (tests.common.test_flags.TestFlags) ... 2022-02-03 00:31:28,261 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:28,261 - pid:1968 [I] load_plugins:334 - Loaded plugin __main__.CacheResponsesPlugin 2022-02-03 00:31:28,262 - pid:1968 [I] load_plugins:334 - Loaded plugin __main__.FilterByUpstreamHostPlugin ok test_unique_plugin_from_args (tests.common.test_flags.TestFlags) ... 2022-02-03 00:31:28,264 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:28,265 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin ok test_unique_plugin_from_bytes (tests.common.test_flags.TestFlags) ... 2022-02-03 00:31:28,268 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:28,269 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin ok test_unique_plugin_from_class (tests.common.test_flags.TestFlags) ... 2022-02-03 00:31:28,272 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:28,272 - pid:1968 [I] load_plugins:334 - Loaded plugin __main__.HttpProxyPlugin ok test_extfile (tests.common.test_pki.TestPki) ... ok test_extfile_no_ext (tests.common.test_pki.TestPki) ... ok test_gen_csr (tests.common.test_pki.TestPki) ... ok test_gen_private_key (tests.common.test_pki.TestPki) ... ok test_gen_public_key (tests.common.test_pki.TestPki) ... ok test_get_ext_config (tests.common.test_pki.TestPki) ... ok test_run_openssl_command (tests.common.test_pki.TestPki) ... ok test_sign_csr (tests.common.test_pki.TestPki) ... ok test_ssl_config (tests.common.test_pki.TestPki) ... ok test_ssl_config_no_ext (tests.common.test_pki.TestPki) ... ok test_context_manager (tests.common.test_utils.TestSocketConnectionUtils) ... ok test_decorator (tests.common.test_utils.TestSocketConnectionUtils) ... ok test_new_socket_connection_dual (tests.common.test_utils.TestSocketConnectionUtils) ... ok test_new_socket_connection_ipv4 (tests.common.test_utils.TestSocketConnectionUtils) ... ok test_new_socket_connection_ipv6 (tests.common.test_utils.TestSocketConnectionUtils) ... ok test_bytes (tests.common.test_text_bytes.TestTextBytes) ... ok test_bytes_int (tests.common.test_text_bytes.TestTextBytes) ... ok test_bytes_nochange (tests.common.test_text_bytes.TestTextBytes) ... ok test_text (tests.common.test_text_bytes.TestTextBytes) ... ok test_text_int (tests.common.test_text_bytes.TestTextBytes) ... ok test_text_nochange (tests.common.test_text_bytes.TestTextBytes) ... ok test_accepts_client_from_server_socket (tests.core.test_acceptor.TestAcceptor) ... 2022-02-03 00:31:30,389 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:30,415 - pid:1968 [D] run:157 - Acceptor#1 shutdown ok test_continues_when_no_events (tests.core.test_acceptor.TestAcceptor) ... 2022-02-03 00:31:30,418 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:30,438 - pid:1968 [D] run:157 - Acceptor#1 shutdown ok testClosesIfNotClosed (tests.core.test_connection.TestTcpConnection) ... ok testFlushReturnsIfNoBuffer (tests.core.test_connection.TestTcpConnection) ... ok testNoOpIfAlreadyClosed (tests.core.test_connection.TestTcpConnection) ... ok testTcpClientRaisesTcpConnectionUninitializedException (tests.core.test_connection.TestTcpConnection) ... ok testTcpServerConnectionProperty (tests.core.test_connection.TestTcpConnection) ... ok testTcpServerEstablishesIPv4Connection (tests.core.test_connection.TestTcpConnection) ... ok testTcpServerEstablishesIPv6Connection (tests.core.test_connection.TestTcpConnection) ... ok testTcpServerIgnoresDoubleConnectSilently (tests.core.test_connection.TestTcpConnection) ... ok testTcpServerRaisesTcpConnectionUninitializedException (tests.core.test_connection.TestTcpConnection) ... ok testThrowsKeyErrorIfNoConn (tests.core.test_connection.TestTcpConnection) ... ok test_event_subscriber (tests.core.test_event_subscriber.TestEventSubscriber) ... 1970-01-15 07:56:07,000 - pid:1968 [D] subscribe:46 - Subscribed relay sub id dec8b5dd2a844f9099b31ab1bb899362 from core events 1970-01-15 07:56:07,000 - pid:1968 [D] unsubscribe:69 - Un-subscribed relay sub id dec8b5dd2a844f9099b31ab1bb899362 from core events ok test_publish (tests.core.test_event_queue.TestCoreEvent) ... ok test_subscribe (tests.core.test_event_queue.TestCoreEvent) ... ok test_unsubscribe (tests.core.test_event_queue.TestCoreEvent) ... ok test_empties_queue (tests.core.test_event_dispatcher.TestEventDispatcher) ... ok test_run (tests.core.test_event_dispatcher.TestEventDispatcher) ... ok test_subscribe (tests.core.test_event_dispatcher.TestEventDispatcher) ... ok test_unsubscribe (tests.core.test_event_dispatcher.TestEventDispatcher) ... ok test_unsubscribe_on_broken_pipe_error (tests.core.test_event_dispatcher.TestEventDispatcher) ... ok test_setup_and_shutdown (tests.core.test_acceptor_pool.TestAcceptorPool) ... 2022-02-03 00:31:32,144 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,164 - pid:1968 [I] listen:113 - Listening on ::1:8899 2022-02-03 00:31:32,176 - pid:1968 [D] start_workers:130 - Started acceptor#0 process 1 2022-02-03 00:31:32,184 - pid:1968 [D] start_workers:130 - Started acceptor#1 process 1 2022-02-03 00:31:32,187 - pid:1968 [I] start_workers:136 - Started 2 workers 2022-02-03 00:31:32,205 - pid:1968 [I] shutdown:153 - Shutting down 2 workers 2022-02-03 00:31:32,220 - pid:1968 [D] shutdown:166 - Acceptors shutdown ok test_e2e (tests.http.test_http_proxy_tls_interception.TestHttpProxyTlsInterception) ... 2022-02-03 00:31:32,262 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,289 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,318 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:32,319 - pid:1968 [D] recv:63 - received 101 bytes from client 2022-02-03 00:31:32,321 - pid:1968 [D] connect_upstream:415 - Connecting to upstream e78b53f5019149c495d8a824d2122b62:443 2022-02-03 00:31:32,328 - pid:1968 [D] connect_upstream:420 - Connected to upstream e78b53f5019149c495d8a824d2122b62:443 2022-02-03 00:31:32,351 - pid:1968 [D] gen_ca_signed_certificate:472 - Generating public key /build/.proxy/certificates/e78b53f5019149c495d8a824d2122b62.pub 2022-02-03 00:31:32,352 - pid:1968 [D] gen_ca_signed_certificate:483 - Generating CSR /build/.proxy/certificates/e78b53f5019149c495d8a824d2122b62.csr 2022-02-03 00:31:32,352 - pid:1968 [D] gen_ca_signed_certificate:495 - Signing CSR /build/.proxy/certificates/e78b53f5019149c495d8a824d2122b62.pem 2022-02-03 00:31:32,365 - pid:1968 [D] flush:92 - flushed 1 bytes to client 2022-02-03 00:31:32,369 - pid:1968 [D] wrap_client:560 - TLS interception using /build/.proxy/certificates/e78b53f5019149c495d8a824d2122b62.pem 2022-02-03 00:31:32,372 - pid:1968 [D] handle_readables:300 - Updated client conn to ok test_build_with_mask (tests.http.test_websocket_frame.TestWebsocketFrame) ... ok test_parse_with_mask (tests.http.test_websocket_frame.TestWebsocketFrame) ... ok test_chunk_parse_basic (tests.http.test_chunk_parser.TestChunkParser) ... ok test_chunk_parse_issue_27 (tests.http.test_chunk_parser.TestChunkParser) Case when data ends with the chunk size but without ending CRLF. ... ok test_to_chunks (tests.http.test_chunk_parser.TestChunkParser) ... ok test_authenticated_proxy_http_get (tests.http.test_protocol_handler.TestHttpProtocolHandler) ... 2022-02-03 00:31:32,405 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,406 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,407 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:32,413 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,431 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,433 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,433 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:32,438 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,445 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:32,446 - pid:1968 [D] recv:63 - received 35 bytes from client 2022-02-03 00:31:32,451 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:32,452 - pid:1968 [D] recv:63 - received 2 bytes from client 2022-02-03 00:31:32,454 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:32,454 - pid:1968 [D] recv:63 - received 137 bytes from client 2022-02-03 00:31:32,455 - pid:1968 [D] connect_upstream:415 - Connecting to upstream localhost:65535 2022-02-03 00:31:32,461 - pid:1968 [D] connect_upstream:420 - Connected to upstream localhost:65535 ok test_authenticated_proxy_http_tunnel (tests.http.test_protocol_handler.TestHttpProtocolHandler) ... 2022-02-03 00:31:32,481 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,482 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,483 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:32,489 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,510 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,511 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,512 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:32,516 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,524 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:32,524 - pid:1968 [D] recv:63 - received 158 bytes from client 2022-02-03 00:31:32,525 - pid:1968 [D] connect_upstream:415 - Connecting to upstream localhost:65535 2022-02-03 00:31:32,530 - pid:1968 [D] connect_upstream:420 - Connected to upstream localhost:65535 2022-02-03 00:31:32,548 - pid:1968 [D] flush:92 - flushed 1 bytes to client 2022-02-03 00:31:32,561 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:32,562 - pid:1968 [D] recv:63 - received 69 bytes from client 2022-02-03 00:31:32,578 - pid:1968 [D] write_to_descriptors:157 - Server is write ready, flushing buffer ok test_http_get (tests.http.test_protocol_handler.TestHttpProtocolHandler) ... 2022-02-03 00:31:32,661 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,663 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,663 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:32,669 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,681 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:32,682 - pid:1968 [D] recv:63 - received 37 bytes from client 2022-02-03 00:31:32,685 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:32,685 - pid:1968 [D] recv:63 - received 96 bytes from client 2022-02-03 00:31:32,686 - pid:1968 [D] connect_upstream:415 - Connecting to upstream localhost:65535 2022-02-03 00:31:32,688 - pid:1968 [D] connect_upstream:420 - Connected to upstream localhost:65535 2022-02-03 00:31:32,699 - pid:1968 [D] write_to_descriptors:157 - Server is write ready, flushing buffer ok test_http_tunnel (tests.http.test_protocol_handler.TestHttpProtocolHandler) ... 2022-02-03 00:31:32,705 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,706 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,706 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:32,709 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,721 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:32,722 - pid:1968 [D] recv:63 - received 117 bytes from client 2022-02-03 00:31:32,723 - pid:1968 [D] connect_upstream:415 - Connecting to upstream localhost:65535 2022-02-03 00:31:32,725 - pid:1968 [D] connect_upstream:420 - Connected to upstream localhost:65535 2022-02-03 00:31:32,733 - pid:1968 [D] handle_writables:226 - Client is ready for writes, flushing buffer 2022-02-03 00:31:32,738 - pid:1968 [D] flush:92 - flushed 1 bytes to client 2022-02-03 00:31:32,740 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:32,740 - pid:1968 [D] recv:63 - received 69 bytes from client 2022-02-03 00:31:32,747 - pid:1968 [D] write_to_descriptors:157 - Server is write ready, flushing buffer ok test_proxy_authentication_failed (tests.http.test_protocol_handler.TestHttpProtocolHandler) ... 2022-02-03 00:31:32,753 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,754 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,754 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:32,757 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,763 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,764 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,764 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:32,765 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.AuthPlugin 2022-02-03 00:31:32,767 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,773 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:32,774 - pid:1968 [D] recv:63 - received 64 bytes from client 2022-02-03 00:31:32,774 - pid:1968 [D] handle_readables:309 - HttpProtocolException type raised ok test_proxy_connection_failed (tests.http.test_protocol_handler.TestHttpProtocolHandler) ... 2022-02-03 00:31:32,781 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,782 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,782 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:32,785 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,791 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:32,792 - pid:1968 [D] recv:63 - received 60 bytes from client 2022-02-03 00:31:32,792 - pid:1968 [D] connect_upstream:415 - Connecting to upstream unknown.domain:80 2022-02-03 00:31:32,796 - pid:1968 [D] handle_readables:309 - HttpProtocolException type raised ok test_build_header (tests.http.test_http_parser.TestHttpParser) ... ok test_build_request (tests.http.test_http_parser.TestHttpParser) ... ok test_build_response (tests.http.test_http_parser.TestHttpParser) ... ok test_build_response_adds_content_length_header (tests.http.test_http_parser.TestHttpParser) ... ok test_build_url_none (tests.http.test_http_parser.TestHttpParser) ... ok test_chunked_request_parse (tests.http.test_http_parser.TestHttpParser) ... ok test_chunked_response_parse (tests.http.test_http_parser.TestHttpParser) ... ok test_connect_request_with_crlf_as_separate_chunk (tests.http.test_http_parser.TestHttpParser) See https://github.com/abhinavsingh/py/issues/70 for background. ... ok test_connect_request_without_host_header_request_parse (tests.http.test_http_parser.TestHttpParser) Case where clients can send CONNECT request without a Host header field. ... ok test_find_line (tests.http.test_http_parser.TestHttpParser) ... ok test_find_line_returns_None (tests.http.test_http_parser.TestHttpParser) ... ok test_get_full_parse (tests.http.test_http_parser.TestHttpParser) ... ok test_get_partial_parse1 (tests.http.test_http_parser.TestHttpParser) ... ok test_get_partial_parse2 (tests.http.test_http_parser.TestHttpParser) ... ok test_has_header (tests.http.test_http_parser.TestHttpParser) ... ok test_header_raises (tests.http.test_http_parser.TestHttpParser) ... ok test_is_http_1_1_keep_alive (tests.http.test_http_parser.TestHttpParser) ... ok test_is_http_1_1_keep_alive_with_non_close_connection_header (tests.http.test_http_parser.TestHttpParser) ... ok test_is_not_http_1_1_keep_alive_for_http_1_0 (tests.http.test_http_parser.TestHttpParser) ... ok test_is_not_http_1_1_keep_alive_with_close_header (tests.http.test_http_parser.TestHttpParser) ... ok test_line_rcvd_to_rcving_headers_state_change (tests.http.test_http_parser.TestHttpParser) ... ok test_paramiko_doc (tests.http.test_http_parser.TestHttpParser) ... ok test_pipelined_chunked_response_parse (tests.http.test_http_parser.TestHttpParser) ... ok test_pipelined_response_parse (tests.http.test_http_parser.TestHttpParser) ... ok test_post_full_parse (tests.http.test_http_parser.TestHttpParser) ... ok test_post_partial_parse (tests.http.test_http_parser.TestHttpParser) ... ok test_request_parse_without_content_length (tests.http.test_http_parser.TestHttpParser) Case when incoming request doesn't contain a content-length header. ... ok test_response_parse (tests.http.test_http_parser.TestHttpParser) ... ok test_response_parse_without_content_length (tests.http.test_http_parser.TestHttpParser) Case when server response doesn't contain a content-length header for non-chunk response types. ... ok test_response_partial_parse (tests.http.test_http_parser.TestHttpParser) ... ok test_set_host_port_raises (tests.http.test_http_parser.TestHttpParser) ... ok test_urlparse (tests.http.test_http_parser.TestHttpParser) ... ok test_proxy_plugin_before_upstream_connection_can_teardown (tests.http.test_http_proxy.TestHttpProxyPlugin) ... 2022-02-03 00:31:32,815 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,824 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,832 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:32,832 - pid:1968 [D] recv:63 - received 73 bytes from client 2022-02-03 00:31:32,833 - pid:1968 [D] handle_readables:309 - HttpProtocolException type raised ok test_proxy_plugin_initialized (tests.http.test_http_proxy.TestHttpProxyPlugin) ... 2022-02-03 00:31:32,838 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,849 - pid:1968 [D] initialize:104 - Handling connection ok test_proxy_plugin_on_and_before_upstream_connection (tests.http.test_http_proxy.TestHttpProxyPlugin) ... 2022-02-03 00:31:32,852 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,861 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,870 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:32,870 - pid:1968 [D] recv:63 - received 73 bytes from client 2022-02-03 00:31:32,872 - pid:1968 [D] connect_upstream:415 - Connecting to upstream upstream.host:80 2022-02-03 00:31:32,876 - pid:1968 [D] connect_upstream:420 - Connected to upstream upstream.host:80 ok test_handshake (tests.http.test_websocket_client.TestWebsocketClient) ... ok test_body_response (tests.http.test_http_request_rejected.TestHttpRequestRejected) ... ok test_empty_response (tests.http.test_http_request_rejected.TestHttpRequestRejected) ... ok test_status_code_response (tests.http.test_http_request_rejected.TestHttpRequestRejected) ... ok test_default_web_server_returns_404 (tests.http.test_web_server.TestWebServerPlugin) ... 2022-02-03 00:31:32,899 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,900 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,900 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:32,906 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,912 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,913 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,913 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:32,916 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,920 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:32,920 - pid:1968 [D] recv:63 - received 23 bytes from client ok test_on_client_connection_called_on_teardown (tests.http.test_web_server.TestWebServerPlugin) ... 2022-02-03 00:31:32,926 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,927 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,927 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:32,931 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,933 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,941 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,943 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,946 - pid:1968 [D] shutdown:173 - Closing client connection at address ('127.0.0.1', 54382) has buffer False 2022-02-03 00:31:32,948 - pid:1968 [D] shutdown:184 - Client connection shutdown successful 2022-02-03 00:31:32,950 - pid:1968 [D] shutdown:189 - Client connection closed ok test_pac_file_served_from_buffer (tests.http.test_web_server.TestWebServerPlugin) ... 2022-02-03 00:31:32,956 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,957 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,958 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:32,961 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,970 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,971 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,971 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:32,972 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPacFilePlugin 2022-02-03 00:31:32,978 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:32,982 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:32,983 - pid:1968 [D] recv:63 - received 18 bytes from client ok test_pac_file_served_from_disk (tests.http.test_web_server.TestWebServerPlugin) ... 2022-02-03 00:31:32,993 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,994 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:32,994 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:32,998 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:33,004 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:33,005 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:33,006 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:33,006 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPacFilePlugin 2022-02-03 00:31:33,010 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:33,014 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:33,015 - pid:1968 [D] recv:63 - received 18 bytes from client ok test_static_web_server_serves (tests.http.test_web_server.TestWebServerPlugin) ... 2022-02-03 00:31:33,024 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:33,025 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:33,025 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:33,029 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:33,039 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:33,040 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:33,040 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:33,043 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:33,046 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:33,047 - pid:1968 [D] recv:63 - received 28 bytes from client 2022-02-03 00:31:33,051 - pid:1968 [D] handle_writables:226 - Client is ready for writes, flushing buffer 2022-02-03 00:31:33,056 - pid:1968 [D] flush:92 - flushed 1 bytes to client ok test_static_web_server_serves_404 (tests.http.test_web_server.TestWebServerPlugin) ... 2022-02-03 00:31:33,061 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:33,062 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:33,063 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:33,066 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:33,073 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:33,074 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2022-02-03 00:31:33,074 - pid:1968 [I] load_plugins:334 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2022-02-03 00:31:33,077 - pid:1968 [D] initialize:104 - Handling connection 2022-02-03 00:31:33,080 - pid:1968 [D] handle_readables:251 - Client is ready for reads, reading 2022-02-03 00:31:33,081 - pid:1968 [D] recv:63 - received 32 bytes from client 2022-02-03 00:31:33,084 - pid:1968 [D] handle_writables:226 - Client is ready for writes, flushing buffer 2022-02-03 00:31:33,091 - pid:1968 [D] flush:92 - flushed 1 bytes to client ok ====================================================================== ERROR: tunnel (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: tunnel Traceback (most recent call last): File "/usr/lib/python3.10/unittest/loader.py", line 154, in loadTestsFromName module = __import__(module_name) File "/build/python-proxy.py/src/proxy.py-2.3.1/proxy/core/ssh/tunnel.py", line 13, in import paramiko ModuleNotFoundError: No module named 'paramiko' ---------------------------------------------------------------------- Ran 132 tests in 7.808s FAILED (errors=1) Test failed: error: Test failed: ==> ERROR: A failure occurred in check().  Aborting...