[tor-commits] [bridgedb/develop] Add unittest for checkDKIM() with `X-DKIM-Authentication-Results: dunno`.

isis at torproject.org isis at torproject.org
Fri Jun 6 20:40:38 UTC 2014


commit 6ce901dfd3497ace147cc57359c669bad2cefa6f
Author: Isis Lovecruft <isis at torproject.org>
Date:   Thu Jun 5 02:59:39 2014 +0000

    Add unittest for checkDKIM() with `X-DKIM-Authentication-Results: dunno`.
    
     * ADD new unittest test_checkDKIM_dunno() to test_email_dkim.py which checks
       that a ``X-DKIM-Authentication-Results: dunno`` header properly returns
       False.
---
 lib/bridgedb/test/test_email_dkim.py |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lib/bridgedb/test/test_email_dkim.py b/lib/bridgedb/test/test_email_dkim.py
index 3407fa5..ee022b0 100644
--- a/lib/bridgedb/test/test_email_dkim.py
+++ b/lib/bridgedb/test/test_email_dkim.py
@@ -62,3 +62,14 @@ get bridges
         result = dkim.checkDKIM(message,
                                 self.domainRules.get("gmail.com"))
         self.assertIs(result, False)
+
+    def test_checkDKIM_dunno(self):
+        """A ``X-DKIM-Authentication-Results: dunno`` header should return
+        False.
+        """
+        messageList = self.badMessage.split('\n')
+        messageList[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)





More information about the tor-commits mailing list