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:
parent
b2adcdf518
commit
ffa7f2e41a
@ -374,7 +374,7 @@ GET_TEMPLATE = """<GetTemplateResponse xmlns="http://ses.amazonaws.com/doc/2010-
|
|||||||
<Template>
|
<Template>
|
||||||
<TemplateName>{{ template_data["template_name"] }}</TemplateName>
|
<TemplateName>{{ template_data["template_name"] }}</TemplateName>
|
||||||
<SubjectPart>{{ template_data["subject_part"] }}</SubjectPart>
|
<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>
|
<TextPart>{{ template_data["text_part"] }}</TextPart>
|
||||||
</Template>
|
</Template>
|
||||||
</GetTemplateResult>
|
</GetTemplateResult>
|
||||||
|
@ -473,7 +473,9 @@ def test_create_ses_template():
|
|||||||
result = conn.get_template(TemplateName="MyTemplate")
|
result = conn.get_template(TemplateName="MyTemplate")
|
||||||
result["Template"]["TemplateName"].should.equal("MyTemplate")
|
result["Template"]["TemplateName"].should.equal("MyTemplate")
|
||||||
result["Template"]["SubjectPart"].should.equal("Greetings, {{name}}!")
|
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
|
# get a template which is not present
|
||||||
with pytest.raises(ClientError) as ex:
|
with pytest.raises(ClientError) as ex:
|
||||||
conn.get_template(TemplateName="MyFakeTemplate")
|
conn.get_template(TemplateName="MyFakeTemplate")
|
||||||
|
Loading…
Reference in New Issue
Block a user