support bucket names in url paths in s3bucket_path
This commit is contained in:
parent
59858dd685
commit
5a475881d2
13 changed files with 575 additions and 163 deletions
15
moto/s3bucket_path/responses.py
Normal file
15
moto/s3bucket_path/responses.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from .models import s3bucket_path_backend
|
||||
|
||||
from .utils import bucket_name_from_url
|
||||
|
||||
from moto.s3.responses import ResponseObject
|
||||
|
||||
|
||||
def parse_key_name(pth):
|
||||
return "/".join(pth.rstrip("/").split("/")[2:])
|
||||
|
||||
S3BucketPathResponseInstance = ResponseObject(
|
||||
s3bucket_path_backend,
|
||||
bucket_name_from_url,
|
||||
parse_key_name,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue