Unverified Commit 712f1169 authored by Isis Lovecruft's avatar Isis Lovecruft
Browse files

Add unittest for checkDKIM() with two `X-DKIM-Authentication-Results:` headers.

 * ADD a new unittest, test_checkDKIM_good_dunno(), to
   test_email_dkim.py, which checks that a received email with two
   ``X-DKIM-Authentication-Results:`` headers (the first one good, the
   second ``dunno``) properly returns False.

 * FIXES #12091. Actually, it doesn't. It just proves that the changes
   in my `fix/9874-automate-email-tests` branch fix #12091. Either way,
   it's fixed, these unittests prove it.
parent 6ce901df
...@@ -73,3 +73,14 @@ get bridges ...@@ -73,3 +73,14 @@ get bridges
result = dkim.checkDKIM(message, result = dkim.checkDKIM(message,
self.domainRules.get("gmail.com")) self.domainRules.get("gmail.com"))
self.assertIs(result, False) self.assertIs(result, False)
def test_checkDKIM_good_dunno(self):
"""A good DKIM verification header, *plus* an
``X-DKIM-Authentication-Results: dunno`` header should return False.
"""
messageList = self.badMessage.split('\n')
messageList.insert(2, "X-DKIM-Authentication-Results: dunno")
message = self._createMessage('\n'.join(messageList))
result = dkim.checkDKIM(message,
self.domainRules.get("gmail.com"))
self.assertIs(result, False)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment