fix idempotency on verify_email_identity endpoint (#5043)
This commit is contained in:
parent
27e469d95e
commit
e63fc08db2
@ -132,7 +132,8 @@ class SESBackend(BaseBackend):
|
||||
|
||||
def verify_email_identity(self, address):
|
||||
_, address = parseaddr(address)
|
||||
self.addresses.append(address)
|
||||
if address not in self.addresses:
|
||||
self.addresses.append(address)
|
||||
|
||||
def verify_email_address(self, address):
|
||||
_, address = parseaddr(address)
|
||||
|
@ -22,6 +22,18 @@ def test_verify_email_identity():
|
||||
address.should.equal("test@example.com")
|
||||
|
||||
|
||||
@mock_ses
|
||||
def test_verify_email_identity_idempotency():
|
||||
conn = boto3.client("ses", region_name="us-east-1")
|
||||
address = "test@example.com"
|
||||
conn.verify_email_identity(EmailAddress=address)
|
||||
conn.verify_email_identity(EmailAddress=address)
|
||||
|
||||
identities = conn.list_identities()
|
||||
address_list = identities["Identities"]
|
||||
address_list.should.equal([address])
|
||||
|
||||
|
||||
@mock_ses
|
||||
def test_verify_email_address():
|
||||
conn = boto3.client("ses", region_name="us-east-1")
|
||||
|
Loading…
Reference in New Issue
Block a user