From 518282dbd3e9161c98def7b66310b0742c8019f7 Mon Sep 17 00:00:00 2001 From: Koudai Aono Date: Thu, 18 Jan 2018 13:05:07 +0900 Subject: [PATCH] change get_param method to get_int_param --- moto/rds2/responses.py | 2 +- tests/test_rds2/test_rds2.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/moto/rds2/responses.py b/moto/rds2/responses.py index f610c1506..eddb0042b 100644 --- a/moto/rds2/responses.py +++ b/moto/rds2/responses.py @@ -123,7 +123,7 @@ class RDS2Response(BaseResponse): start = all_ids.index(marker) + 1 else: start = 0 - page_size = int(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: diff --git a/tests/test_rds2/test_rds2.py b/tests/test_rds2/test_rds2.py index 183a183b1..ea0ab378f 100644 --- a/tests/test_rds2/test_rds2.py +++ b/tests/test_rds2/test_rds2.py @@ -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():