attempting to move to upstream httpretty
This commit is contained in:
parent
fd828bdb2d
commit
47bd4c49a3
23 changed files with 237 additions and 1160 deletions
14
tests/test_s3/test_s3_utils.py
Normal file
14
tests/test_s3/test_s3_utils.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
from sure import expect
|
||||
from moto.s3.utils import bucket_name_from_url
|
||||
|
||||
|
||||
def test_base_url():
|
||||
expect(bucket_name_from_url('https://s3.amazonaws.com/')).should.equal(None)
|
||||
|
||||
|
||||
def test_localhost_bucket():
|
||||
expect(bucket_name_from_url('https://foobar.localhost:5000/abc')).should.equal("foobar")
|
||||
|
||||
|
||||
def test_localhost_without_bucket():
|
||||
expect(bucket_name_from_url('https://www.localhost:5000/def')).should.equal(None)
|
||||
Loading…
Add table
Add a link
Reference in a new issue