summaryrefslogtreecommitdiff
path: root/tests/unit/test_service.py
diff options
context:
space:
mode:
authorTim Burke <tim.burke@gmail.com>2017-07-06 12:43:11 -0700
committerTim Burke <tim.burke@gmail.com>2017-07-06 12:43:11 -0700
commit484d7ee9b21396d066604e8e876ffb3d6ed6d359 (patch)
tree0d495235245cc7e05f3ba6bd54218fc7fa1d5438 /tests/unit/test_service.py
parent1d57403668815ab8cef9d6598c06bf1c7e5355c0 (diff)
downloadpython-swiftclient-484d7ee9b21396d066604e8e876ffb3d6ed6d359.tar.gz
Allow --meta on upload
Previously, the --meta option was only allowed on post or copy subcommands. Change-Id: I87bf0338c34b5e89aa946505bee68dbeb37d784c Closes-Bug: #1616238
Diffstat (limited to 'tests/unit/test_service.py')
-rw-r--r--tests/unit/test_service.py35
1 files changed, 9 insertions, 26 deletions
diff --git a/tests/unit/test_service.py b/tests/unit/test_service.py
index b759e6b..2a477fe 100644
--- a/tests/unit/test_service.py
+++ b/tests/unit/test_service.py
@@ -1146,14 +1146,9 @@ class TestServiceUpload(_TestServiceBase):
container='test_c',
source=f.name,
obj='ใƒ†ใ‚นใƒˆ/dummy.dat',
- options={'changed': False,
- 'skip_identical': False,
- 'leave_segments': True,
- 'header': '',
- 'segment_size': 10,
- 'segment_container': None,
- 'use_slo': False,
- 'checksum': True})
+ options=dict(s._options,
+ segment_size=10,
+ leave_segments=True))
mtime = r['headers']['x-object-meta-mtime']
self.assertEqual(expected_mtime, mtime)
@@ -1350,12 +1345,8 @@ class TestServiceUpload(_TestServiceBase):
container='test_c',
source=f.name,
obj='test_o',
- options={'changed': False,
- 'skip_identical': False,
- 'leave_segments': True,
- 'header': '',
- 'segment_size': 0,
- 'checksum': True})
+ options=dict(s._options,
+ leave_segments=True))
mtime = r['headers']['x-object-meta-mtime']
self.assertEqual(expected_mtime, mtime)
@@ -1405,12 +1396,8 @@ class TestServiceUpload(_TestServiceBase):
container='test_c',
source=f,
obj='test_o',
- options={'changed': False,
- 'skip_identical': False,
- 'leave_segments': True,
- 'header': '',
- 'segment_size': 0,
- 'checksum': True})
+ options=dict(s._options,
+ leave_segments=True))
mtime = float(r['headers']['x-object-meta-mtime'])
self.assertEqual(mtime, expected_mtime)
@@ -1452,12 +1439,8 @@ class TestServiceUpload(_TestServiceBase):
container='test_c',
source=f.name,
obj='test_o',
- options={'changed': False,
- 'skip_identical': False,
- 'leave_segments': True,
- 'header': '',
- 'segment_size': 0,
- 'checksum': True})
+ options=dict(s._options,
+ leave_segments=True))
self.assertIs(r['success'], False)
self.assertIn('md5 mismatch', str(r.get('error')))