Fix:SES:Get Template Html part (#3504)

* SES:Get Template Html part

* Linting

* Linting

Co-authored-by: Bert Blommers <info@bertblommers.nl>
This commit is contained in:
usmangani1 2020-12-03 13:12:19 +05:30 committed by GitHub
parent b2adcdf518
commit ffa7f2e41a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -374,7 +374,7 @@ GET_TEMPLATE = """<GetTemplateResponse xmlns="http://ses.amazonaws.com/doc/2010-
<Template>
<TemplateName>{{ template_data["template_name"] }}</TemplateName>
<SubjectPart>{{ template_data["subject_part"] }}</SubjectPart>
<HtmlPart>{{ template_data["html_part"] }}</HtmlPart>
<HtmlPart><![CDATA[{{ template_data["html_part"] }}]]></HtmlPart>
<TextPart>{{ template_data["text_part"] }}</TextPart>
</Template>
</GetTemplateResult>

View File

@ -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(
"<h1>Hello {{name}}," "</h1><p>Your favorite animal is {{favoriteanimal}}.</p>"
)
# get a template which is not present
with pytest.raises(ClientError) as ex:
conn.get_template(TemplateName="MyFakeTemplate")