[tor-bugs] #5232 [BridgeDB]: Import bridges into BridgeDB in a separate thread and database transaction

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Dec 13 03:34:18 UTC 2013


#5232: Import bridges into BridgeDB in a separate thread and database transaction
--------------------------+--------------------------
     Reporter:  karsten   |      Owner:  isis
         Type:  defect    |     Status:  needs_review
     Priority:  major     |  Milestone:
    Component:  BridgeDB  |    Version:
   Resolution:            |   Keywords:  important
Actual Points:            |  Parent ID:
       Points:            |
--------------------------+--------------------------

Comment (by isis):

 Ignore my "fix" above. It doesn't fix anything, it just breaks things.

 Sysrqb fixed this in their branch,
 `bug5232_r2_based_on_fix/9462_r9462C_r2`. CI build passes and is [https
 ://travis-ci.org/isislovecruft/bridgedb/builds/15379877 here], however,
 some of the old unittests in `lib/bridgedb/Tests.py` fail. The output
 follows. All tests which fail due to `Bridges.parseORAddressLine()`
 missing are my fault, that functionality was moved to the rewritten
 parsers in the `bridgedb.parse.networkstatus` module for #9462. I'm more
 concerned about the errors saying:

 {{{
 exceptions.ValueError: database parameter must be string or APSW
 Connection object
 }}}

 My local test run produces the following results:
 {{{
 (bridgedb)∃!isisⒶwintermute:(testing/sysrqb/bug5232_r2_based_on_fix/9462_r9462C_r2
 *$=)~/code/torproject/bridgedb ∴ bridgedb test
 bridgedb.test.test_EmailServer
   EmailGnuPGTest
     test_getGPGContext_bad_keyfile ...
 [OK]
     test_getGPGContext_good_keyfile ...
 [SKIPPED]
     test_getGPGContext_missing_keyfile ...
 [OK]
 bridgedb.Tests
   BridgeStabilityTests
     testAddOrUpdateSingleBridgeHistory ...
 [ERROR]
     testDeletingSingleBridgeHistory ...
 [ERROR]
     testDiscountAndPruneBridgeHistory ...
 [ERROR]
     testFamiliar ...
 [ERROR]
     testLastSeenWithDifferentAddressAndPort ...
 [ERROR]
     testTOSA ...
 [ERROR]
   DictStorageTests
     testComplexDict ...
 [OK]
     testSimpleDict ...
 [OK]
   EmailBridgeDistTests
     testEmailRateLimit ...
 [OK]
     testUnsupportedDomain ...
 [OK]
   IPBridgeDistTests
     testBasicDist ...
 [OK]
     testDistWithCategories ...
 [OK]
     testDistWithFilterAll ...
 [ERROR]
     testDistWithFilterBlockedCountries ...
 [ERROR]
     testDistWithFilterBlockedCountriesAdvanced ...
 [ERROR]
     testDistWithFilterBoth ...
 [ERROR]
     testDistWithFilterIP4 ...
 [ERROR]
     testDistWithFilterIP6 ...
 [ERROR]
   ParseDescFileTests
     testConvolutedOrAddress ...
 [OK]
     testMultipleOrAddress ...
 [OK]
     testParseCountryBlockFile ...
 [OK]
     testSimpleDesc ...
 [OK]
     testSingleOrAddress ...
 [OK]
   SQLStorageTests
     testBridgeStorage ...
 [OK]
 bridgedb.test.test_Tests
   TrialAdaptedOldUnittests
     test_allOldUnittests ...
 [ERROR]
 bridgedb.test.test_bridgedb
   BridgeDBCliTest
     test_bridgedb_commands ...
 Copying config:
   '/home/isis/code/torproject/bridgedb/bridgedb.conf'
                 ↓ ↓ ↓
   '/home/isis/code/torproject/bridgedb/_trial_temp/rundir/bridgedb.conf'

 Copying GPG test key:
   '/home/isis/code/torproject/bridgedb/gnupghome/TESTING.subkeys.sec'
                 ↓ ↓ ↓
 '/home/isis/code/torproject/bridgedb/_trial_temp/rundir/gnupghome/TESTING.subkeys.sec'

 Running subcommands from directory:
   '/home/isis/code/torproject/bridgedb/_trial_temp/rundir'
 Running '/home/isis/code/torproject/bridgedb/scripts/make-ssl-cert'...
 Generating RSA private key, 4096 bit long modulus
 .............................++
 .................................................................................................................................................................................................................................++
 e is 65537 (0x10001)
 writing RSA key
 Signature ok
 subject=/C=DE/ST=Berlin-Brandenburg/O=PWND Consulting
 Getting Private key
 Done. Your private key was saved in
 /home/isis/code/torproject/bridgedb/privkey.pem
 and your certificate is in /home/isis/code/torproject/bridgedb/cert
 Copying certificate:
   '/home/isis/code/torproject/bridgedb/cert'
                 ↓ ↓ ↓
   '/home/isis/code/torproject/bridgedb/_trial_temp/rundir/cert'

 Copying SSL private key:
   '/home/isis/code/torproject/bridgedb/privkey.pem'
                 ↓ ↓ ↓
   '/home/isis/code/torproject/bridgedb/_trial_temp/rundir/privkey.pem'

 Running bridgedb script '/home/isis/.virtualenvs/bridgedb/bin/bridgedb'...
 Running `bridgedb mock' to generate mock bridge descriptors...
 WARNING: Can't import PyNaCl. NTOR key generation is disabled.
 Generating 50 bridge descriptors...
 ..................................................
 Writing descriptors to files...Done.
 Sucessfully generated 50 descriptors.
 `bridgedb mock' exited with status code 0
 Running `bridgedb' to test server startups...
 Unhandled Error
 Traceback (most recent call last):
   File "/usr/lib/python2.7/threading.py", line 781, in __bootstrap
     self.__bootstrap_inner()
   File "/usr/lib/python2.7/threading.py", line 808, in __bootstrap_inner
     self.run()
   File "/usr/lib/python2.7/threading.py", line 761, in run
     self.__target(*self.__args, **self.__kwargs)
 --- <exception caught here> ---
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/twisted/python/threadpool.py", line 191, in _worker
     result = context.call(ctx, function, *args, **kwargs)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/twisted/python/context.py", line 118, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/twisted/python/context.py", line 81, in callWithContext
     return func(*args,**kw)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Main.py",
 line 212, in updateBridgeHistory
     bridge, timestamp)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-
 py2.7.egg/bridgedb/Stability.py", line 137, in addOrUpdateBridgeHistory
     if not db: db = bridgedb.Storage.getDB(True)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 512, in getDB
     return Database(db_filename) if newHandle else _THE_DB
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 209, in __init__
     self._conn = openDatabase(sqlite_fname)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 428, in openDatabase
     conn = sqlite3.Connection(sqlite_file)
 exceptions.ValueError: database parameter must be string or APSW
 Connection object
 `bridgedb' exited with status code 0
                                             [OK]
 bridgedb.test.test_crypto
   CryptoTest
     test_getKey_keyexists ...
 [OK]
     test_getKey_nokey ...
 [OK]
     test_getKey_tmpfile ...
 [OK]
 bridgedb.test.test_parse_addr
   ParseAddrIsIPAddressTests
     test_filehandle ...
 [OK]
     test_isIPAddress_IP4DefaultRoute ...
 [OK]
     test_isIPAddress_IP4LimitedBroadcast ...
 [OK]
     test_isIPAddress_IP4LinkLocal ...
 [OK]
     test_isIPAddress_IP4Localhost ...
 [OK]
     test_isIPAddress_IP4Loopback ...
 [OK]
     test_isIPAddress_IP4Multicast_224 ...
 [OK]
     test_isIPAddress_IP4Multicast_239 ...
 [OK]
     test_isIPAddress_IP4ReservedRFC1700 ...
 [OK]
     test_isIPAddress_IP4ReservedRFC1918_10 ...
 [OK]
     test_isIPAddress_IP4ReservedRFC1918_172_16 ...
 [OK]
     test_isIPAddress_IP4ReservedRFC1918_192_168 ...
 [OK]
     test_isIPAddress_IP4Unspecified ...
 [OK]
     test_isIPAddress_IP6DefaultRoute ...
 [OK]
     test_isIPAddress_IP6LinkLocal ...
 [OK]
     test_isIPAddress_IP6SiteLocal ...
 [OK]
     test_isIPAddress_IP6UniqueLocal ...
 [OK]
     test_isIPAddress_IP6Unspecified ...
 [OK]
     test_isIPAddress_randomIP4 ...
 [OK]
     test_isIPAddress_randomIP6 ...
 [OK]
     test_isIPAddress_withNonIP ...
 [OK]
     test_returnUncompressedIP ...
 [OK]
     test_unicode ...
 [OK]
   ParseAddrIsIPv4Tests
     test_isIPv4_IP4DefaultRoute ...
 [OK]
     test_isIPv4_IP4LimitedBroadcast ...
 [OK]
     test_isIPv4_IP4LinkLocal ...
 [OK]
     test_isIPv4_IP4Localhost ...
 [OK]
     test_isIPv4_IP4Loopback ...
 [OK]
     test_isIPv4_IP4Multicast_224 ...
 [OK]
     test_isIPv4_IP4Multicast_239 ...
 [OK]
     test_isIPv4_IP4ReservedRFC1700 ...
 [OK]
     test_isIPv4_IP4ReservedRFC1918_10 ...
 [OK]
     test_isIPv4_IP4ReservedRFC1918_172_16 ...
 [OK]
     test_isIPv4_IP4ReservedRFC1918_192_168 ...
 [OK]
     test_isIPv4_IP4Unspecified ...
 [OK]
     test_isIPv4_IP6DefaultRoute ...
 [OK]
     test_isIPv4_IP6LinkLocal ...
 [OK]
     test_isIPv4_IP6Localhost ...
 [OK]
     test_isIPv4_IP6SiteLocal ...
 [OK]
     test_isIPv4_IP6UniqueLocal ...
 [OK]
     test_isIPv4_IP6Unspecified ...
 [OK]
     test_isIPv4_randomIP4 ...
 [OK]
     test_isIPv4_randomIP6 ...
 [OK]
     test_isIPv4_withNonIP ...
 [OK]
     test_isIPv4_withValidIPv4 ...
 [OK]
     test_isIPv4_withValidIPv4_2 ...
 [OK]
     test_isIPv4_withValidIPv4_3 ...
 [OK]
     test_isIPv4_withValidIPv6 ...
 [OK]
   ParseAddrIsIPv6Tests
     test_isIPv6_IP4DefaultRoute ...
 [OK]
     test_isIPv6_IP4LimitedBroadcast ...
 [OK]
     test_isIPv6_IP4LinkLocal ...
 [OK]
     test_isIPv6_IP4Localhost ...
 [OK]
     test_isIPv6_IP4Loopback ...
 [OK]
     test_isIPv6_IP4Multicast_224 ...
 [OK]
     test_isIPv6_IP4Multicast_239 ...
 [OK]
     test_isIPv6_IP4ReservedRFC1700 ...
 [OK]
     test_isIPv6_IP4ReservedRFC1918_10 ...
 [OK]
     test_isIPv6_IP4ReservedRFC1918_172_16 ...
 [OK]
     test_isIPv6_IP4ReservedRFC1918_192_168 ...
 [OK]
     test_isIPv6_IP4Unspecified ...
 [OK]
     test_isIPv6_IP6DefaultRoute ...
 [OK]
     test_isIPv6_IP6LinkLocal ...
 [OK]
     test_isIPv6_IP6Localhost ...
 [OK]
     test_isIPv6_IP6SiteLocal ...
 [OK]
     test_isIPv6_IP6UniqueLocal ...
 [OK]
     test_isIPv6_IP6Unspecified ...
 [OK]
     test_isIPv6_randomIP4 ...
 [OK]
     test_isIPv6_randomIP6 ...
 [OK]
     test_isIPv6_withNonIP ...
 [OK]
     test_isIPv6_withValidIPv4 ...
 [OK]
     test_isIPv6_withValidIPv4_2 ...
 [OK]
     test_isIPv6_withValidIPv4_3 ...
 [OK]
     test_isIPv6_withValidIPv6 ...
 [OK]
   PortListTest
     test_contains ...
 [OK]
     test_getitem_long ...
 [OK]
     test_getitem_shouldContain ...
 [OK]
     test_getitem_shouldNotContain ...
 [OK]
     test_getitem_string ...
 [OK]
     test_invalidPortNumber ...
 [OK]
     test_invalidStringArgs ...
 [OK]
     test_iter ...
 [OK]
     test_mixedArgs ...
 [OK]
     test_str ...
 [OK]
     test_tooFewPorts ...
 [OK]
     test_tooManyPorts ...
 [OK]
 bridgedb.test.test_parse_networkstatus
   ParseNetworkStatusALineTests
     test_IPv4 ...
 [OK]
 /home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-
 py2.7.egg/bridgedb/parse/networkstatus.py:192: FutureWarning: Got IPv4
 address in networkstatus 'a'-line! Networkstatus document format may have
 changed!
     test_IPv4BadPortSeparator ...
 [OK]
     test_IPv4InvalidAddress ...
 [OK]
     test_IPv4MissingPort ...
 [OK]
     test_IPv6 ...
 [OK]
     test_IPv6BadPortSeparator ...
 [OK]
     test_IPv6BadPortlist ...
 [OK]
     test_missingPrefix ...
 [OK]
   ParseNetworkStatusRLineTests
     test_invalidDescriptorDigest ...
 [OK]
     test_invalidDescriptorDigest_invalidBase64 ...
 [OK]
     test_invalidDescriptorDigest_singleQuoteChar ...
 [OK]
     test_invalidDescriptorDigest_withBase64padding ...
 [OK]
     test_invalidIPAddress ...
 [OK]
     test_invalidIdentBase64 ...
 [OK]
     test_invalidIdentSingleQuoteChar ...
 [OK]
     test_invalidIdent_withBase64padding ...
 [OK]
     test_invalidNicknameNonAlphanumeric ...
 [OK]
     test_invalidNicknameTooLong ...
 [OK]
     test_invalidTimestamp ...
 [OK]
     test_invalidTimestampMissingDate ...
 [OK]
     test_missingAfterDesc ...
 [OK]
     test_missingAfterIdent ...
 [OK]
     test_missingPrefix ...
 [OK]
     test_valid ...
 [OK]
     test_wrongFieldOrder ...
 [OK]
     test_wrongNumberOfFields ...
 [OK]
   ParseNetworkStatusSLineTests
     test_makeBelieveFlag ...
 [OK]
     test_missingPrefix ...
 [OK]
     test_noFlags ...
 [OK]
 bridgedb.test.test_persistent
   StateTest
     test_STATEFILE ...
 [OK]
     test_before_useChangedSettings_config ...
 [OK]
     test_before_useChangedSettings_state ...
 [OK]
     test_before_useChangedSettings_stateConfig ...
 [OK]
     test_configCreation ...
 [OK]
     test_docstring_persistent ...
 [OK]
     test_docstring_persistentState ...
 [OK]
     test_existsLoad ...
 [OK]
     test_existsSave ...
 [OK]
     test_getStateFor ...
 [OK]
     test_optionsCreation ...
 [OK]
     test_persistent_getState ...
 [OK]
     test_persistent_state ...
 [OK]
     test_stateCreation ...
 [OK]
     test_state_init ...
 [OK]
     test_useChangedSettings ...
 [OK]
 bridgedb.test.test_persistentSaveAndLoad
   StateSaveAndLoadTests
     test_load ...
 [OK]
     test_save ...
 [OK]
     test_stateLoadTempfile ...
 [OK]
     test_stateSaveAndLoad ...
 [OK]
     test_stateSaveTempfile ...
 [OK]

 ===============================================================================
 [SKIPPED]
 See #5463 for why this test fails when it should pass

 bridgedb.test.test_EmailServer.EmailGnuPGTest.test_getGPGContext_good_keyfile
 ===============================================================================
 [ERROR]
 Traceback (most recent call last):
   File "/usr/lib/python2.7/unittest/case.py", line 331, in run
     testMethod()
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 655, in testAddOrUpdateSingleBridgeHistory
     bhe = bridgedb.Stability.addOrUpdateBridgeHistory(b, timestamp)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-
 py2.7.egg/bridgedb/Stability.py", line 137, in addOrUpdateBridgeHistory
     if not db: db = bridgedb.Storage.getDB(True)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 512, in getDB
     return Database(db_filename) if newHandle else _THE_DB
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 209, in __init__
     self._conn = openDatabase(sqlite_fname)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 428, in openDatabase
     conn = sqlite3.Connection(sqlite_file)
 exceptions.ValueError: database parameter must be string or APSW
 Connection object

 bridgedb.Tests.BridgeStabilityTests.testAddOrUpdateSingleBridgeHistory
 ===============================================================================
 [ERROR]
 Traceback (most recent call last):
   File "/usr/lib/python2.7/unittest/case.py", line 331, in run
     testMethod()
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 664, in testDeletingSingleBridgeHistory
     bhe = bridgedb.Stability.addOrUpdateBridgeHistory(b, timestamp)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-
 py2.7.egg/bridgedb/Stability.py", line 137, in addOrUpdateBridgeHistory
     if not db: db = bridgedb.Storage.getDB(True)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 512, in getDB
     return Database(db_filename) if newHandle else _THE_DB
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 209, in __init__
     self._conn = openDatabase(sqlite_fname)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 428, in openDatabase
     conn = sqlite3.Connection(sqlite_file)
 exceptions.ValueError: database parameter must be string or APSW
 Connection object

 bridgedb.Tests.BridgeStabilityTests.testDeletingSingleBridgeHistory
 ===============================================================================
 [ERROR]
 Traceback (most recent call last):
   File "/usr/lib/python2.7/unittest/case.py", line 331, in run
     testMethod()
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 753, in testDiscountAndPruneBridgeHistory
     bridgedb.Stability.addOrUpdateBridgeHistory(b, i)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-
 py2.7.egg/bridgedb/Stability.py", line 137, in addOrUpdateBridgeHistory
     if not db: db = bridgedb.Storage.getDB(True)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 512, in getDB
     return Database(db_filename) if newHandle else _THE_DB
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 209, in __init__
     self._conn = openDatabase(sqlite_fname)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 428, in openDatabase
     conn = sqlite3.Connection(sqlite_file)
 exceptions.ValueError: database parameter must be string or APSW
 Connection object

 bridgedb.Tests.BridgeStabilityTests.testDiscountAndPruneBridgeHistory
 ===============================================================================
 [ERROR]
 Traceback (most recent call last):
   File "/usr/lib/python2.7/unittest/case.py", line 331, in run
     testMethod()
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 721, in testFamiliar
     [ bridgedb.Stability.addOrUpdateBridgeHistory(b, i) for i in
 time_series ]
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-
 py2.7.egg/bridgedb/Stability.py", line 137, in addOrUpdateBridgeHistory
     if not db: db = bridgedb.Storage.getDB(True)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 512, in getDB
     return Database(db_filename) if newHandle else _THE_DB
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 209, in __init__
     self._conn = openDatabase(sqlite_fname)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 428, in openDatabase
     conn = sqlite3.Connection(sqlite_file)
 exceptions.ValueError: database parameter must be string or APSW
 Connection object

 bridgedb.Tests.BridgeStabilityTests.testFamiliar
 ===============================================================================
 [ERROR]
 Traceback (most recent call last):
   File "/usr/lib/python2.7/unittest/case.py", line 331, in run
     testMethod()
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 698, in testLastSeenWithDifferentAddressAndPort
     [ bridgedb.Stability.addOrUpdateBridgeHistory(b, t) for t in ts ]
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-
 py2.7.egg/bridgedb/Stability.py", line 137, in addOrUpdateBridgeHistory
     if not db: db = bridgedb.Storage.getDB(True)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 512, in getDB
     return Database(db_filename) if newHandle else _THE_DB
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 209, in __init__
     self._conn = openDatabase(sqlite_fname)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 428, in openDatabase
     conn = sqlite3.Connection(sqlite_file)
 exceptions.ValueError: database parameter must be string or APSW
 Connection object

 bridgedb.Tests.BridgeStabilityTests.testLastSeenWithDifferentAddressAndPort
 ===============================================================================
 [ERROR]
 Traceback (most recent call last):
   File "/usr/lib/python2.7/unittest/case.py", line 331, in run
     testMethod()
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 682, in testTOSA
     bridgedb.Stability.addOrUpdateBridgeHistory(b,t)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-
 py2.7.egg/bridgedb/Stability.py", line 137, in addOrUpdateBridgeHistory
     if not db: db = bridgedb.Storage.getDB(True)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 512, in getDB
     return Database(db_filename) if newHandle else _THE_DB
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 209, in __init__
     self._conn = openDatabase(sqlite_fname)
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Storage.py",
 line 428, in openDatabase
     conn = sqlite3.Connection(sqlite_file)
 exceptions.ValueError: database parameter must be string or APSW
 Connection object

 bridgedb.Tests.BridgeStabilityTests.testTOSA
 ===============================================================================
 [ERROR]
 Traceback (most recent call last):
   File "/usr/lib/python2.7/unittest/case.py", line 331, in run
     testMethod()
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 336, in testDistWithFilterAll
     d.insert(fakeBridge6(or_addresses=True))
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 136, in fakeBridge6
     address,portlist = bridgedb.Bridges.parseORAddressLine(
 exceptions.AttributeError: 'module' object has no attribute
 'parseORAddressLine'

 bridgedb.Tests.IPBridgeDistTests.testDistWithFilterAll
 ===============================================================================
 [ERROR]
 Traceback (most recent call last):
   File "/usr/lib/python2.7/unittest/case.py", line 331, in run
     testMethod()
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 347, in testDistWithFilterBlockedCountries
     d.insert(fakeBridge6(or_addresses=True))
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 136, in fakeBridge6
     address,portlist = bridgedb.Bridges.parseORAddressLine(
 exceptions.AttributeError: 'module' object has no attribute
 'parseORAddressLine'

 bridgedb.Tests.IPBridgeDistTests.testDistWithFilterBlockedCountries
 ===============================================================================
 [ERROR]
 Traceback (most recent call last):
   File "/usr/lib/python2.7/unittest/case.py", line 331, in run
     testMethod()
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 373, in testDistWithFilterBlockedCountriesAdvanced
     d.insert(fakeBridge6(or_addresses=True, transports=True))
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 136, in fakeBridge6
     address,portlist = bridgedb.Bridges.parseORAddressLine(
 exceptions.AttributeError: 'module' object has no attribute
 'parseORAddressLine'

 bridgedb.Tests.IPBridgeDistTests.testDistWithFilterBlockedCountriesAdvanced
 ===============================================================================
 [ERROR]
 Traceback (most recent call last):
   File "/usr/lib/python2.7/unittest/case.py", line 331, in run
     testMethod()
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 312, in testDistWithFilterBoth
     d.insert(fakeBridge6(or_addresses=True))
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 136, in fakeBridge6
     address,portlist = bridgedb.Bridges.parseORAddressLine(
 exceptions.AttributeError: 'module' object has no attribute
 'parseORAddressLine'

 bridgedb.Tests.IPBridgeDistTests.testDistWithFilterBoth
 ===============================================================================
 [ERROR]
 Traceback (most recent call last):
   File "/usr/lib/python2.7/unittest/case.py", line 331, in run
     testMethod()
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 296, in testDistWithFilterIP4
     d.insert(fakeBridge6(or_addresses=True))
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 136, in fakeBridge6
     address,portlist = bridgedb.Bridges.parseORAddressLine(
 exceptions.AttributeError: 'module' object has no attribute
 'parseORAddressLine'

 bridgedb.Tests.IPBridgeDistTests.testDistWithFilterIP4
 ===============================================================================
 [ERROR]
 Traceback (most recent call last):
   File "/usr/lib/python2.7/unittest/case.py", line 331, in run
     testMethod()
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 280, in testDistWithFilterIP6
     d.insert(fakeBridge6(or_addresses=True))
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-py2.7.egg/bridgedb/Tests.py",
 line 136, in fakeBridge6
     address,portlist = bridgedb.Bridges.parseORAddressLine(
 exceptions.AttributeError: 'module' object has no attribute
 'parseORAddressLine'

 bridgedb.Tests.IPBridgeDistTests.testDistWithFilterIP6
 ===============================================================================
 [ERROR]
 Traceback (most recent call last):
   File "/home/isis/.virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.0.1_305_gc590861_dirty-
 py2.7.egg/bridgedb/test/test_Tests.py", line 47, in test_allOldUnittests
     testSuite.run(testresult, debug=True)
 exceptions.NameError: global name 'testresult' is not defined

 bridgedb.test.test_Tests.TrialAdaptedOldUnittests.test_allOldUnittests
 -------------------------------------------------------------------------------
 Ran 167 tests in 125.998s

 FAILED (skips=1, errors=13, successes=153)
 (bridgedb)∃!isisⒶwintermute:(testing/sysrqb/bug5232_r2_based_on_fix/9462_r9462C_r2
 *$=)~/code/torproject/bridgedb ∴

 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5232#comment:10>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list