From 9ba4d380616652008af8efd4044819ce12fa35ae Mon Sep 17 00:00:00 2001 From: James Saryerwinnie Date: Mon, 2 Feb 2015 14:41:44 -0800 Subject: [PATCH] Move constants to transferconfig --- awscli/customizations/s3/s3handler.py | 4 ++-- awscli/customizations/s3/{constants.py => transferconfig.py} | 0 tests/unit/customizations/s3/__init__.py | 2 +- tests/unit/customizations/s3/test_tasks.py | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) rename awscli/customizations/s3/{constants.py => transferconfig.py} (100%) diff --git a/awscli/customizations/s3/s3handler.py b/awscli/customizations/s3/s3handler.py index 5588faf1d673..2f336dae0e6c 100644 --- a/awscli/customizations/s3/s3handler.py +++ b/awscli/customizations/s3/s3handler.py @@ -16,8 +16,8 @@ import os import sys -from awscli.customizations.s3.constants import MULTI_THRESHOLD, CHUNKSIZE, \ - NUM_THREADS, MAX_QUEUE_SIZE +from awscli.customizations.s3.transferconfig import MULTI_THRESHOLD, \ + CHUNKSIZE, NUM_THREADS, MAX_QUEUE_SIZE from awscli.customizations.s3.utils import find_chunksize, \ operate, find_bucket_key, relative_path, PrintTask, create_warning from awscli.customizations.s3.executor import Executor diff --git a/awscli/customizations/s3/constants.py b/awscli/customizations/s3/transferconfig.py similarity index 100% rename from awscli/customizations/s3/constants.py rename to awscli/customizations/s3/transferconfig.py diff --git a/tests/unit/customizations/s3/__init__.py b/tests/unit/customizations/s3/__init__.py index 02b9e2ebad19..41190af0e904 100644 --- a/tests/unit/customizations/s3/__init__.py +++ b/tests/unit/customizations/s3/__init__.py @@ -26,7 +26,7 @@ class S3HandlerBaseTest(unittest.TestCase): shorter amount of time. """ def setUp(self): - wait = 'awscli.customizations.s3.constants.QUEUE_TIMEOUT_WAIT' + wait = 'awscli.customizations.s3.transferconfig.QUEUE_TIMEOUT_WAIT' self.wait_timeout_patch = patch(wait, 0.01) self.mock_wait = self.wait_timeout_patch.start() diff --git a/tests/unit/customizations/s3/test_tasks.py b/tests/unit/customizations/s3/test_tasks.py index 96f65dd63fa8..7faf4e21cf11 100644 --- a/tests/unit/customizations/s3/test_tasks.py +++ b/tests/unit/customizations/s3/test_tasks.py @@ -18,7 +18,7 @@ from botocore.exceptions import IncompleteReadError -from awscli.customizations.s3 import constants +from awscli.customizations.s3 import transferconfig from awscli.customizations.s3.tasks import CreateLocalFileTask from awscli.customizations.s3.tasks import CompleteDownloadTask from awscli.customizations.s3.tasks import DownloadPartTask @@ -410,7 +410,7 @@ def test_retried_requests_dont_enqueue_writes_twice(self): success_read, ] self.filename.is_stream = True - task = DownloadPartTask(0, constants.CHUNKSIZE, self.result_queue, + task = DownloadPartTask(0, transferconfig.CHUNKSIZE, self.result_queue, self.service, self.filename, self.context, self.io_queue) task()