From 1b6007e2b2b8cf44ec8a3bf799cd51925bd9659d Mon Sep 17 00:00:00 2001 From: David Wilcox Date: Sun, 5 Mar 2017 14:36:25 +1100 Subject: [PATCH] Correct IAM list_server_certs template that was based off incorrect docs (#836) The documentation for this method is here https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListServerCertificates.html The docs say the return type is this ServerCertificateMetadataList.member.N but the sample response incorrectly include a . I've sent feedback to the AWS docs telling them to fix their stuff but this also needs to be fixed. I haven't checked other templates with tags in them, as they may be prone to this same problem. --- moto/iam/responses.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/moto/iam/responses.py b/moto/iam/responses.py index 223691e1e..6884c2025 100644 --- a/moto/iam/responses.py +++ b/moto/iam/responses.py @@ -578,18 +578,16 @@ LIST_SERVER_CERTIFICATES_TEMPLATE = """ {% for certificate in server_certificates %} - - {{ certificate.cert_name }} - {% if certificate.path %} - {{ certificate.path }} - arn:aws:iam::123456789012:server-certificate/{{ certificate.path }}/{{ certificate.cert_name }} - {% else %} - arn:aws:iam::123456789012:server-certificate/{{ certificate.cert_name }} - {% endif %} - 2010-05-08T01:02:03.004Z - ASCACKCEVSQ6C2EXAMPLE - 2012-05-08T01:02:03.004Z - + {{ certificate.cert_name }} + {% if certificate.path %} + {{ certificate.path }} + arn:aws:iam::123456789012:server-certificate/{{ certificate.path }}/{{ certificate.cert_name }} + {% else %} + arn:aws:iam::123456789012:server-certificate/{{ certificate.cert_name }} + {% endif %} + 2010-05-08T01:02:03.004Z + ASCACKCEVSQ6C2EXAMPLE + 2012-05-08T01:02:03.004Z {% endfor %}