[tor-commits] [bridgedb/master] Add unittest for del() of bridges.PluggableTransport.port property.
isis at torproject.org
isis at torproject.org
Sat Mar 21 02:03:00 UTC 2015
commit 868b6e62fe791ad01fab511107646ebf25342700
Author: Isis Lovecruft <isis at torproject.org>
Date: Sun Dec 28 12:42:17 2014 +0000
Add unittest for del() of bridges.PluggableTransport.port property.
---
lib/bridgedb/test/test_bridges.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/lib/bridgedb/test/test_bridges.py b/lib/bridgedb/test/test_bridges.py
index 23ee70b..794351f 100644
--- a/lib/bridgedb/test/test_bridges.py
+++ b/lib/bridgedb/test/test_bridges.py
@@ -470,6 +470,18 @@ class PluggableTransportTests(unittest.TestCase):
pt = bridges.PluggableTransport()
self.assertIsInstance(pt, bridges.PluggableTransport)
+ def test_PluggableTransport_port_del(self):
+ """The del method for the port property should reset the port to None.
+ """
+ pt = bridges.PluggableTransport(self.fingerprint,
+ "voltronPT", "1.2.3.4", 443,
+ {'sharedsecret': 'foobar'})
+ self.assertEqual(pt.port, 443)
+
+ del(pt.port)
+ self.assertIsNone(pt.port)
+ self.assertIsNone(pt._port)
+
def test_PluggableTransport_parseArgumentsIntoDict_valid_list(self):
"""Parsing a valid list of PT args should return a dictionary."""
pt = bridges.PluggableTransport()
More information about the tor-commits
mailing list