SendGrid UUID message_id cleanup

* Update authors
* Update integration tests
* Add webhook message_id = smtp-id fallback test case
* Test webhooks ignore smtp-id in non-fallback cases
* Update docs
This commit is contained in:
medmunds
2018-05-30 13:50:35 -07:00
parent d8d1407c61
commit c0172063a4
8 changed files with 71 additions and 23 deletions

View File

@@ -166,13 +166,13 @@ class AnymailTestMixin:
second = rfc822_unfold(second)
self.assertEqual(first, second, msg)
def assertUUIDIsValid(self, uuid_str, version=4):
def assertUUIDIsValid(self, uuid_str, msg=None, version=4):
"""Assert the uuid_str evaluates to a valid UUID"""
try:
uuid.UUID(uuid_str, version=version)
except (ValueError, AttributeError, TypeError):
return False
return True
raise self.failureException(
msg or "%r is not a valid UUID" % uuid_str)
# Backported from Python 3.4