[tor-bugs] #7874 [Stem]: add more unit tests for Controller

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Jan 6 23:10:09 UTC 2013


#7874: add more unit tests for Controller
----------------------------+-----------------------------------------------
    Reporter:  robinson     |       Owner:  atagar 
        Type:  enhancement  |      Status:  closed 
    Priority:  minor        |   Milestone:         
   Component:  Stem         |     Version:         
  Resolution:  implemented  |    Keywords:  testing
      Parent:               |      Points:         
Actualpoints:               |  
----------------------------+-----------------------------------------------
Changes (by atagar):

  * status:  new => closed
  * resolution:  => implemented


Comment:

 Very nice additions. Thanks!

 > desc = "r %s %s u5lTXJKGsLKufRLnSyVqT7TdGYw 2012-12-30 22:02:49

 You're setting quite a few fields so I'm not positive which is cleaner,
 but you might want to consider using the mocking module for this...

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

 {{{
 desc = mocking.get_router_status_entry_v2({
   "r": "%s %s u5lTXJKGsLKufRLnSyVqT7TdGYw 2012-12-30 22:02:49 77.223.43.54
 9001 0" % (nickname, fingerprint),
   "s": "Fast Named Running Stable Valid",
   "w": "Bandwidth=75",
 }, content = True}}
 }}}

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


More information about the tor-bugs mailing list