mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user