From ffa7f2e41ad610e4f7b3ebbc06081a8df2459cc7 Mon Sep 17 00:00:00 2001 From: usmangani1 Date: Thu, 3 Dec 2020 13:12:19 +0530 Subject: [PATCH] Fix:SES:Get Template Html part (#3504) * SES:Get Template Html part * Linting * Linting Co-authored-by: Bert Blommers --- moto/ses/responses.py | 2 +- tests/test_ses/test_ses_boto3.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/moto/ses/responses.py b/moto/ses/responses.py index 9702c724..703cd2e7 100644 --- a/moto/ses/responses.py +++ b/moto/ses/responses.py @@ -374,7 +374,7 @@ GET_TEMPLATE = """ {{ template_data["subject_part"] }} - {{ template_data["html_part"] }} + {{ template_data["text_part"] }} diff --git a/tests/test_ses/test_ses_boto3.py b/tests/test_ses/test_ses_boto3.py index 5af4d9cb..e3c2b6d3 100644 --- a/tests/test_ses/test_ses_boto3.py +++ b/tests/test_ses/test_ses_boto3.py @@ -473,7 +473,9 @@ def test_create_ses_template(): result = conn.get_template(TemplateName="MyTemplate") result["Template"]["TemplateName"].should.equal("MyTemplate") result["Template"]["SubjectPart"].should.equal("Greetings, {{name}}!") - + result["Template"]["HtmlPart"].should.equal( + "

Hello {{name}}," "

Your favorite animal is {{favoriteanimal}}.

" + ) # get a template which is not present with pytest.raises(ClientError) as ex: conn.get_template(TemplateName="MyFakeTemplate")