Fix services to work better with other regions. Closes #17.

This commit is contained in:
Steve Pulec 2013-04-13 18:22:26 -04:00
parent d96769a91c
commit 8fe0c91853
4 changed files with 12 additions and 3 deletions

View File

@ -1,7 +1,7 @@
from .responses import handler
url_bases = [
"https?://dynamodb.us-east-1.amazonaws.com",
"https?://dynamodb.(.+).amazonaws.com",
"https?://sts.amazonaws.com",
]

View File

@ -2,7 +2,7 @@ from .responses import EC2Response
url_bases = [
"https?://ec2.us-east-1.amazonaws.com",
"https?://ec2.(.+).amazonaws.com",
]
url_paths = {

View File

@ -1,7 +1,7 @@
from .responses import EmailResponse
url_bases = [
"https?://email.us-east-1.amazonaws.com"
"https?://email.(.+).amazonaws.com"
]
url_paths = {

View File

@ -43,3 +43,12 @@ def test_sts_handler():
res = requests.post("https://sts.amazonaws.com/", data={"GetSessionToken": ""})
res.ok.should.be.ok
res.text.should.contain("SecretAccessKey")
@mock_dynamodb
def test_dynamodb_with_connect_to_region():
# this will work if connected with boto.connect_dynamodb()
dynamodb = boto.dynamodb.connect_to_region('us-west-2')
schema = dynamodb.create_schema('column1', str(), 'column2', int())
dynamodb.create_table('table1', schema, 200, 200)