From cda63e42ddb6b44907b30a506f052e0165d4c70d Mon Sep 17 00:00:00 2001 From: Abhinav Singh Date: Thu, 18 Apr 2024 08:53:58 +0530 Subject: [PATCH] Fix tests for Python 3.6 and 3.7 --- proxy/proxy.py | 5 +---- tests/test_main.py | 7 ++++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/proxy/proxy.py b/proxy/proxy.py index 640a7e0439..4279c611d5 100644 --- a/proxy/proxy.py +++ b/proxy/proxy.py @@ -30,7 +30,6 @@ DEFAULT_PID_FILE, DEFAULT_LOG_LEVEL, DEFAULT_BASIC_AUTH, DEFAULT_LOG_FORMAT, DEFAULT_WORK_KLASS, DEFAULT_OPEN_FILE_LIMIT, DEFAULT_ENABLE_DASHBOARD, DEFAULT_ENABLE_SSH_TUNNEL, - DEFAULT_DATA_DIRECTORY_PATH, ) @@ -150,9 +149,7 @@ '--data-dir', type=str, default=None, - help='Default: {0}. Path to proxypy data directory.'.format( - DEFAULT_DATA_DIRECTORY_PATH, - ), + help='Default: ~/.proxypy. Path to proxypy data directory.', ) diff --git a/tests/test_main.py b/tests/test_main.py index da0cbf143a..d939273cb4 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -33,9 +33,9 @@ DEFAULT_ENABLE_SSH_TUNNEL, DEFAULT_ENABLE_WEB_SERVER, DEFAULT_DISABLE_HTTP_PROXY, PLUGIN_WEBSOCKET_TRANSPORT, DEFAULT_CA_SIGNING_KEY_FILE, DEFAULT_CLIENT_RECVBUF_SIZE, - DEFAULT_SERVER_RECVBUF_SIZE, DEFAULT_CACHE_DIRECTORY_PATH, - DEFAULT_ENABLE_REVERSE_PROXY, DEFAULT_ENABLE_STATIC_SERVER, - _env_threadless_compliant, + DEFAULT_DATA_DIRECTORY_PATH, DEFAULT_SERVER_RECVBUF_SIZE, + DEFAULT_CACHE_DIRECTORY_PATH, DEFAULT_ENABLE_REVERSE_PROXY, + DEFAULT_ENABLE_STATIC_SERVER, _env_threadless_compliant, ) @@ -83,6 +83,7 @@ def mock_default_args(mock_args: mock.Mock) -> None: mock_args.enable_ssh_tunnel = DEFAULT_ENABLE_SSH_TUNNEL mock_args.enable_reverse_proxy = DEFAULT_ENABLE_REVERSE_PROXY mock_args.unix_socket_path = None + mock_args.data_dir = DEFAULT_DATA_DIRECTORY_PATH mock_args.cache_dir = DEFAULT_CACHE_DIRECTORY_PATH @mock.patch('os.remove')