diff options
author | Daniel Wakefield <daniel.wakefield@hp.com> | 2015-03-04 14:01:55 +0000 |
---|---|---|
committer | Daniel Wakefield <daniel.wakefield@hp.com> | 2015-03-04 14:01:55 +0000 |
commit | 13780f37c3f5e5f18f10f131d1ef39c010457e87 (patch) | |
tree | 88fcf8f9b626a40bac3a74555a3afb7cbb39063a /tests/unit/utils.py | |
parent | 925c01ebfbdfb6478a3786f24a9572deae40f8f8 (diff) | |
download | python-swiftclient-13780f37c3f5e5f18f10f131d1ef39c010457e87.tar.gz |
Add improvements to MD5 validation.
With MD5Sum checking being added, a concern was brought up that It was
a change with no possibility of reverting to the old behaviour.
This change adds the flag '--ignore-checksum' to the upload subcommand
allowing the checks to be turned off.
Changed occurrences of the magic string for a null md5 to use a descriptive
constant instead.
Updated Error messages generated when validation fails. They should now be more descriptive
and not output a literal newline sequence.
Change-Id: Id1756cbb6700bb7e38f0ee0e75bc535e37f777ed
Diffstat (limited to 'tests/unit/utils.py')
-rw-r--r-- | tests/unit/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unit/utils.py b/tests/unit/utils.py index 88d6d12..3e87ea2 100644 --- a/tests/unit/utils.py +++ b/tests/unit/utils.py @@ -25,6 +25,7 @@ from six.moves import reload_module from six.moves.urllib.parse import urlparse, ParseResult from swiftclient import client as c from swiftclient import shell as s +from swiftclient.utils import EMPTY_ETAG def fake_get_auth_keystone(expected_os_options=None, exc=None, @@ -127,7 +128,7 @@ def fake_http_connect(*code_iter, **kwargs): 'last-modified': self.timestamp, 'x-object-meta-test': 'testing', 'etag': - self.etag or '"d41d8cd98f00b204e9800998ecf8427e"', + self.etag or '"%s"' % EMPTY_ETAG, 'x-works': 'yes', 'x-account-container-count': 12345} if not self.timestamp: |