commit 4bbf7a9914dfc3fb585857cab62dc1d292f2f4ed Author: Isis Lovecruft isis@torproject.org Date: Wed Apr 23 09:25:03 2014 +0000
Fix incorrect types used to initiate test instances of Bridge class. --- lib/bridgedb/test/test_Bridges.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/lib/bridgedb/test/test_Bridges.py b/lib/bridgedb/test/test_Bridges.py index 421b308..b51019b 100644 --- a/lib/bridgedb/test/test_Bridges.py +++ b/lib/bridgedb/test/test_Bridges.py @@ -3,31 +3,38 @@ # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: please also see AUTHORS file -# :copyright: (c) 2007-2013, The Tor Project, Inc. -# (c) 2007-2013, all entities within the AUTHORS file +# :copyright: (c) 2007-2014, The Tor Project, Inc. +# (c) 2007-2014, all entities within the AUTHORS file # :license: 3-Clause BSD, see LICENSE for licensing information
"""Unittests for the :mod:`bridgedb.EmailServer` module."""
-from twisted.trial import unittest +import ipaddr from binascii import a2b_hex + +from twisted.trial import unittest + from bridgedb import Bridges +from bridgedb.parse.addr import PortList + import hashlib try: from cStringIO import StringIO except ImportError: from io import StringIO
+ class BridgeClassTest(unittest.TestCase): """Tests for :class:`bridgedb.Bridges.Bridge`."""
def setUp(self): self.nickname = 'unnamed' - self.ip = '127.0.0.1' + self.ip = ipaddr.IPAddress('127.0.0.1') self.orport = '9001' self.fingerprint = 'a1cc8dfef1fa11af9c40af1054df9daf45250556' self.id_digest = a2b_hex(self.fingerprint) - self.or_addresses = {} + self.or_addresses = {ipaddr.IPAddress('6.6.6.6'): PortList(6666), + ipaddr.IPAddress('42.1.42.1'): PortList(443)}
def test_init(self): try: