hash_cb=None,
upload_cb=None,
etag=None,
+ if_etag_match=None,
if_not_exist=None,
content_encoding=None,
content_disposition=None,
:param etag: (str)
+ :param if_etag_match: (str) Push that value to if-match header at file
+ creation
+
:param if_not_exist: (bool) If true, the file will be uploaded ONLY if
it does not exist remotely, otherwise the operation will fail.
Involves the case of an object with the same path is created while
format='json',
hashmap=True,
content_type=content_type,
+ if_etag_match=if_etag_match,
if_etag_not_match='*' if if_not_exist else None,
etag=etag,
json=hashmap,
tmpFile.seek(0)
kwargs = dict(
etag='s0m3E74g',
+ if_etag_match='if etag match',
if_not_exist=True,
content_type=ctype,
content_disposition=ctype + 'd15p051710n',
content_encoding='802.11')
self.client.upload_object(obj, tmpFile, **kwargs)
kwargs.pop('if_not_exist')
+ ematch = kwargs.pop('if_etag_match')
etag = kwargs.pop('etag')
for arg, val in kwargs.items():
self.assertEqual(OP.mock_calls[-2][2][arg], val)
+ self.assertEqual(OP.mock_calls[-1][2]['if_etag_match'], ematch)
self.assertEqual(OP.mock_calls[-1][2]['if_etag_not_match'], '*')
self.assertEqual(OP.mock_calls[-1][2]['etag'], etag)