[tor-commits] [bridgedb/master] Add unittest for Bridge._verifyExtraInfoSignature with a valid sig.

isis at torproject.org isis at torproject.org
Sat Mar 21 02:03:00 UTC 2015


commit 38446439f0424a544412ac9a15b878eccd282206
Author: Isis Lovecruft <isis at torproject.org>
Date:   Sat Feb 14 00:34:15 2015 +0000

    Add unittest for Bridge._verifyExtraInfoSignature with a valid sig.
---
 lib/bridgedb/test/test_bridges.py |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/bridgedb/test/test_bridges.py b/lib/bridgedb/test/test_bridges.py
index 11a9d64..9353d1c 100644
--- a/lib/bridgedb/test/test_bridges.py
+++ b/lib/bridgedb/test/test_bridges.py
@@ -845,6 +845,14 @@ class BridgeTests(unittest.TestCase):
                           self.bridge.updateFromServerDescriptor,
                           self.serverdescriptor)
 
+    def test_Bridge_verifyExtraInfoSignature_good_signature(self):
+        """Calling _verifyExtraInfoSignature() with a descriptor which has a
+        good signature should return None.
+        """
+        self.bridge.updateFromNetworkStatus(self.networkstatus)
+        self.bridge.updateFromServerDescriptor(self.serverdescriptor)
+        self.assertIsNone(self.bridge._verifyExtraInfoSignature(self.extrainfo))
+
     def test_Bridge_updateFromExtraInfoDescriptor(self):
         """Bridge.updateFromExtraInfoDescriptor() should add the expected
         number of pluggable transports.





More information about the tor-commits mailing list