Merge remote-tracking branch 'upstream/master' into adding_iam_credentials_report

This commit is contained in:
Mike Fuller 2015-02-03 09:43:55 +11:00
commit 96e5f2875d
2 changed files with 21 additions and 1 deletions

View File

@ -2,7 +2,7 @@ from __future__ import unicode_literals
from .responses import RDSResponse from .responses import RDSResponse
url_bases = [ url_bases = [
"https?://rds.(.+).amazonaws.com", "https?://rds(\..+)?.amazonaws.com",
] ]
url_paths = { url_paths = {

View File

@ -237,3 +237,23 @@ def test_create_database_replica():
primary = conn.get_all_dbinstances("db-master-1")[0] primary = conn.get_all_dbinstances("db-master-1")[0]
list(primary.read_replica_dbinstance_identifiers).should.have.length_of(0) list(primary.read_replica_dbinstance_identifiers).should.have.length_of(0)
@disable_on_py3()
@mock_rds
def test_connecting_to_us_east_1():
# boto does not use us-east-1 in the URL for RDS,
# and that broke moto in the past:
# https://github.com/boto/boto/blob/e271ff09364ea18d9d8b6f4d63d6b0ac6cbc9b75/boto/endpoints.json#L285
conn = boto.rds.connect_to_region("us-east-1")
database = conn.create_dbinstance("db-master-1", 10, 'db.m1.small', 'root', 'hunter2',
security_groups=["my_sg"])
database.status.should.equal('available')
database.id.should.equal("db-master-1")
database.allocated_storage.should.equal(10)
database.instance_class.should.equal("db.m1.small")
database.master_username.should.equal("root")
database.endpoint.should.equal(('db-master-1.aaaaaaaaaa.us-east-1.rds.amazonaws.com', 3306))
database.security_groups[0].name.should.equal('my_sg')