From 2b0e7da9985700f72904a5a3b7130b4f436250b0 Mon Sep 17 00:00:00 2001 From: usmankb Date: Wed, 6 May 2020 20:28:50 +0530 Subject: [PATCH] SES get send statistics response modification --- moto/ses/responses.py | 30 ++++++++++++++++-------------- tests/test_ses/test_ses.py | 8 ++++---- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/moto/ses/responses.py b/moto/ses/responses.py index 62893094a..8c9dc8f75 100644 --- a/moto/ses/responses.py +++ b/moto/ses/responses.py @@ -292,20 +292,22 @@ SET_IDENTITY_NOTIFICATION_TOPIC_RESPONSE = """""" GET_SEND_STATISTICS = """ - - {% for statistics in all_statistics %} - - {{ statistics["DeliveryAttempts"] }} - {{ statistics["Rejects"] }} - {{ statistics["Bounces"] }} - {{ statistics["Complaints"] }} - {{ statistics["Timestamp"] }} - - {% endfor %} - - - e0abcdfa-c866-11e0-b6d0-273d09173z49 - + + + {% for statistics in all_statistics %} + + {{ statistics["DeliveryAttempts"] }} + {{ statistics["Rejects"] }} + {{ statistics["Bounces"] }} + {{ statistics["Complaints"] }} + {{ statistics["Timestamp"] }} + + {% endfor %} + + + e0abcdfa-c866-11e0-b6d0-273d09173z49 + + """ CREATE_CONFIGURATION_SET = """ diff --git a/tests/test_ses/test_ses.py b/tests/test_ses/test_ses.py index 719e4ede9..7d7674bea 100644 --- a/tests/test_ses/test_ses.py +++ b/tests/test_ses/test_ses.py @@ -145,10 +145,10 @@ def test_get_send_statistics(): result = conn.get_send_statistics() reject_count = int( - result["GetSendStatisticsResponse"]["SendDataPoints"][0]["Rejects"] + result["GetSendStatisticsResponse"]["GetSendStatisticsResult"]["SendDataPoints"][0]["Rejects"] ) delivery_count = int( - result["GetSendStatisticsResponse"]["SendDataPoints"][0]["DeliveryAttempts"] + result["GetSendStatisticsResponse"]["GetSendStatisticsResult"]["SendDataPoints"][0]["DeliveryAttempts"] ) reject_count.should.equal(1) delivery_count.should.equal(0) @@ -162,10 +162,10 @@ def test_get_send_statistics(): result = conn.get_send_statistics() reject_count = int( - result["GetSendStatisticsResponse"]["SendDataPoints"][0]["Rejects"] + result["GetSendStatisticsResponse"]["GetSendStatisticsResult"]["SendDataPoints"][0]["Rejects"] ) delivery_count = int( - result["GetSendStatisticsResponse"]["SendDataPoints"][0]["DeliveryAttempts"] + result["GetSendStatisticsResponse"]["GetSendStatisticsResult"]["SendDataPoints"][0]["DeliveryAttempts"] ) reject_count.should.equal(1) delivery_count.should.equal(1)