[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb/develop] Add additional unittest assertion to test_SMTPAutoresponder_getMailTo_UnsupportedDomain().



commit 5596d18f69da58e7bd772fa63e7674fe0e716efb
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Sat Jun 7 03:02:43 2014 +0000

    Add additional unittest assertion to test_SMTPAutoresponder_getMailTo_UnsupportedDomain().
    
    If anything in this list ends up in the list of permitted client email
    addresses, we should know about it, and also fail the test.
---
 lib/bridgedb/test/test_email_autoresponder.py |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/bridgedb/test/test_email_autoresponder.py b/lib/bridgedb/test/test_email_autoresponder.py
index 3cc802b..39cf1bd 100644
--- a/lib/bridgedb/test/test_email_autoresponder.py
+++ b/lib/bridgedb/test/test_email_autoresponder.py
@@ -397,9 +397,11 @@ class SMTPAutoresponderTests(unittest.TestCase):
         self.assertIsInstance(clients, list, (
             "Returned value of SMTPAutoresponder.getMailTo() isn't a list! "
             "Type: %s" % type(clients)))
+        self.assertTrue(emailFrom not in clients)
         # The client was from an unsupported domain; they shouldn't be in the
         # clients list:
-        self.assertEqual(len(clients), 0)
+        self.assertEqual(len(clients), 0,
+                         "clients = %s" % repr(clients))
 
     def test_SMTPAutoresponder_reply_noFrom(self):
         """A received email without a "From:" or "Sender:" header shouldn't



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits