diff options
author | Peter Portante <peter.portante@redhat.com> | 2012-10-22 13:59:31 -0400 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-10-30 09:46:02 -0700 |
commit | 5c272f4d1c4ae67a3cf5a6af17518c82f520c1de (patch) | |
tree | 72aad852f80b96b33661a4b3053cce6b3d0dc8ed /swift/1.4.8/test | |
parent | 232adb88512274863c9f5ad51569695af80bd6c0 (diff) |
Minor refactorings to mark an internal routine
Just a couple of changes to mark a routine as internal to this module (leading
underscore, helps understand what is part of the utils API and what is not),
and use of the positional argument for memcache for consistency and reduction
in line count (doing this ahead of another refactoring to keep changes
concise).
Change-Id: I71581ad6ac4c383b1de787b767be568fc0a87eef
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Reviewed-on: http://review.gluster.org/4138
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Mohammed Junaid <junaid@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'swift/1.4.8/test')
-rw-r--r-- | swift/1.4.8/test/unit/plugins/test_utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/swift/1.4.8/test/unit/plugins/test_utils.py b/swift/1.4.8/test/unit/plugins/test_utils.py index 70081a7d26e..0731c78656b 100644 --- a/swift/1.4.8/test/unit/plugins/test_utils.py +++ b/swift/1.4.8/test/unit/plugins/test_utils.py @@ -291,14 +291,14 @@ class TestUtils(unittest.TestCase): def test_get_etag_empty(self): tf = tempfile.NamedTemporaryFile() - hd = utils.get_etag(tf.name) + hd = utils._get_etag(tf.name) assert hd == hashlib.md5().hexdigest() def test_get_etag(self): tf = tempfile.NamedTemporaryFile() tf.file.write('123' * utils.CHUNK_SIZE) tf.file.flush() - hd = utils.get_etag(tf.name) + hd = utils._get_etag(tf.name) tf.file.seek(0) md5 = hashlib.md5() while True: @@ -335,7 +335,7 @@ class TestUtils(unittest.TestCase): assert md[utils.X_CONTENT_TYPE] == utils.FILE_TYPE assert md[utils.X_CONTENT_LENGTH] == os.path.getsize(tf.name) assert md[utils.X_TIMESTAMP] == normalize_timestamp(os.path.getctime(tf.name)) - assert md[utils.X_ETAG] == utils.get_etag(tf.name) + assert md[utils.X_ETAG] == utils._get_etag(tf.name) def test_get_object_metadata_dir(self): td = tempfile.mkdtemp() @@ -372,7 +372,7 @@ class TestUtils(unittest.TestCase): assert md[utils.X_CONTENT_TYPE] == utils.FILE_TYPE assert md[utils.X_CONTENT_LENGTH] == os.path.getsize(tf.name) assert md[utils.X_TIMESTAMP] == normalize_timestamp(os.path.getctime(tf.name)) - assert md[utils.X_ETAG] == utils.get_etag(tf.name) + assert md[utils.X_ETAG] == utils._get_etag(tf.name) def test_create_object_metadata_dir(self): td = tempfile.mkdtemp() |