From 4c738ed5b2ea981242295d6568929e5359221a86 Mon Sep 17 00:00:00 2001 From: Brian Pandola Date: Wed, 16 Nov 2022 18:58:24 -0800 Subject: [PATCH] Fix: RDS server test should use Query protocol (#5679) --- tests/test_rds/test_server.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/test_rds/test_server.py b/tests/test_rds/test_server.py index 5a8d3a521..e306eeb3a 100644 --- a/tests/test_rds/test_server.py +++ b/tests/test_rds/test_server.py @@ -1,4 +1,4 @@ -import json +from urllib.parse import urlencode import moto.server as server import sure # noqa # pylint: disable=unused-import @@ -16,18 +16,20 @@ def test_create_db_instance(): backend = server.create_backend_app("rds") test_client = backend.test_client() - body = { + params = { + "Action": "CreateDBInstance", "DBInstanceIdentifier": "hi", "DBInstanceClass": "db.m4.large", "Engine": "aurora", "StorageType": "standard", "Port": 3306, } - res = test_client.post("/?Action=CreateDBInstance", data=json.dumps(body)) + qs = urlencode(params) + resp = test_client.post(f"/?{qs}") - response = res.data.decode("utf-8") + response = resp.data.decode("utf-8") response.shouldnt.contain("") - + response.should.contain("hifalse") response.should.contain(