cleanup code.
This commit is contained in:
parent
1df454a632
commit
0df03ba409
9 changed files with 47 additions and 92 deletions
|
|
@ -1,6 +1,4 @@
|
|||
from __future__ import unicode_literals
|
||||
# from .models import s3bucket_path_backend
|
||||
from moto import mock_s3
|
||||
|
||||
# mock_s3bucket_path = s3bucket_path_backend.decorator
|
||||
from moto import mock_s3
|
||||
mock_s3bucket_path = mock_s3
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
from __future__ import unicode_literals
|
||||
from moto.s3.models import S3Backend
|
||||
|
||||
|
||||
class S3BucketPathBackend(S3Backend):
|
||||
pass
|
||||
|
||||
s3bucket_path_backend = S3BucketPathBackend()
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
from __future__ import unicode_literals
|
||||
from .models import s3bucket_path_backend
|
||||
|
||||
from .utils import bucket_name_from_url, parse_key_name, is_delete_keys
|
||||
|
||||
from moto.s3.responses import ResponseObject
|
||||
|
||||
|
||||
S3BucketPathResponseInstance = ResponseObject(
|
||||
s3bucket_path_backend,
|
||||
bucket_name_from_url,
|
||||
parse_key_name,
|
||||
is_delete_keys,
|
||||
)
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
from __future__ import unicode_literals
|
||||
from .responses import S3BucketPathResponseInstance as ro
|
||||
|
||||
url_bases = [
|
||||
"https?://s3(.*).amazonaws.com"
|
||||
]
|
||||
|
||||
|
||||
def bucket_response2(*args):
|
||||
return ro.bucket_response(*args)
|
||||
|
||||
|
||||
def bucket_response3(*args):
|
||||
return ro.bucket_response(*args)
|
||||
|
||||
url_paths = {
|
||||
'{0}/$': bucket_response3,
|
||||
'{0}/(?P<bucket_name>[a-zA-Z0-9\-_.]+)$': ro.bucket_response,
|
||||
'{0}/(?P<bucket_name>[a-zA-Z0-9\-_.]+)/$': bucket_response2,
|
||||
'{0}/(?P<bucket_name>[a-zA-Z0-9\-_./]+)/(?P<key_name>.+)': ro.key_response
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue