[tor-bugs] #9937 [BridgeDB]: Create fake non-sanitised bridge descriptors for BridgeDB testing purposes

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Oct 9 15:53:22 UTC 2013


#9937: Create fake non-sanitised bridge descriptors for BridgeDB testing purposes
-------------------------+-------------------------------------------------
     Reporter:  isis     |      Owner:  isis
         Type:           |     Status:  needs_review
  enhancement            |  Milestone:
     Priority:  major    |    Version:
    Component:           |   Keywords:  bridgedb bridge-descriptors
  BridgeDB               |  bridgedb-unittests stem
   Resolution:           |  Parent ID:  #9865
Actual Points:           |
       Points:           |
-------------------------+-------------------------------------------------

Comment (by atagar):

 Likely more heavy weight than you'd like, but stem also has a test module
 for generating several varieties of fake descriptors...

 https://gitweb.torproject.org/stem.git/blob/HEAD:/test/mocking.py

 For instance...

 {{{
 >>> import test.mocking
 >>> print test.mocking.get_bridge_server_descriptor(attr = {'router-
 digest': '204FD46BA75E7735A6A3B8B75FE2E2435A13BDB4'}, content = True)
 router Unnamed 10.45.227.253 9001 0 0
 router-digest 204FD46BA75E7735A6A3B8B75FE2E2435A13BDB4
 published 2012-03-22 17:34:38
 bandwidth 409600 819200 5120
 reject *:*
 }}}

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


More information about the tor-bugs mailing list