Merge pull request #1381 from koxudaxi/fix_MaxRecords_on_describe_db_instances

cast MaxRecords to int on  describe_db_instances
This commit is contained in:
Steve Pulec 2018-03-06 22:45:28 -05:00 committed by GitHub
commit 6668a6e17f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -123,7 +123,7 @@ class RDS2Response(BaseResponse):
start = all_ids.index(marker) + 1
else:
start = 0
page_size = self._get_param('MaxRecords', 50) # the default is 100, but using 50 to make testing easier
page_size = self._get_int_param('MaxRecords', 50) # the default is 100, but using 50 to make testing easier
instances_resp = all_instances[start:start + page_size]
next_marker = None
if len(all_instances) > start + page_size:

View File

@ -197,6 +197,8 @@ def test_get_databases_paginated():
resp2 = conn.describe_db_instances(Marker=resp["Marker"])
resp2["DBInstances"].should.have.length_of(1)
resp3 = conn.describe_db_instances(MaxRecords=100)
resp3["DBInstances"].should.have.length_of(51)
@mock_rds2
def test_describe_non_existant_database():