[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [bridgedb/master] Add unittest for checkDKIM() with `X-DKIM-Authentication-Results: dunno`.
commit 6ce901dfd3497ace147cc57359c669bad2cefa6f
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
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)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits