Get standalone server mode working for all tests.
This commit is contained in:
parent
cb28eeefbb
commit
81836b6981
78 changed files with 957 additions and 783 deletions
|
|
@ -1,4 +1,6 @@
|
|||
from __future__ import unicode_literals
|
||||
from .models import s3_backend
|
||||
|
||||
s3_backends = {"global": s3_backend}
|
||||
mock_s3 = s3_backend.decorator
|
||||
mock_s3_deprecated = s3_backend.deprecated_decorator
|
||||
|
|
@ -89,21 +89,21 @@ class FakeKey(object):
|
|||
|
||||
@property
|
||||
def response_dict(self):
|
||||
r = {
|
||||
res = {
|
||||
'etag': self.etag,
|
||||
'last-modified': self.last_modified_RFC1123,
|
||||
'content-length': str(len(self.value)),
|
||||
}
|
||||
if self._storage_class != 'STANDARD':
|
||||
r['x-amz-storage-class'] = self._storage_class
|
||||
res['x-amz-storage-class'] = self._storage_class
|
||||
if self._expiry is not None:
|
||||
rhdr = 'ongoing-request="false", expiry-date="{0}"'
|
||||
r['x-amz-restore'] = rhdr.format(self.expiry_date)
|
||||
res['x-amz-restore'] = rhdr.format(self.expiry_date)
|
||||
|
||||
if self._is_versioned:
|
||||
r['x-amz-version-id'] = str(self._version_id)
|
||||
res['x-amz-version-id'] = str(self._version_id)
|
||||
|
||||
return r
|
||||
return res
|
||||
|
||||
@property
|
||||
def size(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue