Merge #913.
This commit is contained in:
parent
408a70992c
commit
0adebeed24
36 changed files with 669 additions and 58 deletions
|
|
@ -1,11 +1,12 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import boto3
|
||||
import boto.rds
|
||||
import boto.vpc
|
||||
from boto.exception import BotoServerError
|
||||
import sure # noqa
|
||||
|
||||
from moto import mock_ec2_deprecated, mock_rds_deprecated
|
||||
from moto import mock_ec2_deprecated, mock_rds_deprecated, mock_rds
|
||||
from tests.helpers import disable_on_py3
|
||||
|
||||
|
||||
|
|
@ -45,6 +46,26 @@ def test_get_databases():
|
|||
databases[0].id.should.equal("db-master-1")
|
||||
|
||||
|
||||
@disable_on_py3()
|
||||
@mock_rds
|
||||
def test_get_databases_paginated():
|
||||
conn = boto3.client('rds', region_name="us-west-2")
|
||||
|
||||
for i in range(51):
|
||||
conn.create_db_instance(AllocatedStorage=5,
|
||||
Port=5432,
|
||||
DBInstanceIdentifier='rds%d' % i,
|
||||
DBInstanceClass='db.t1.micro',
|
||||
Engine='postgres')
|
||||
|
||||
resp = conn.describe_db_instances()
|
||||
resp["DBInstances"].should.have.length_of(50)
|
||||
resp["Marker"].should.equal(resp["DBInstances"][-1]['DBInstanceIdentifier'])
|
||||
|
||||
resp2 = conn.describe_db_instances(Marker=resp["Marker"])
|
||||
resp2["DBInstances"].should.have.length_of(1)
|
||||
|
||||
|
||||
@mock_rds_deprecated
|
||||
def test_describe_non_existant_database():
|
||||
conn = boto.rds.connect_to_region("us-west-2")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue