[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #7499 [Stem]: Unit test bug - mocking.py:_get_descriptor_content() handlign of 'opt' keyword



#7499: Unit test bug - mocking.py:_get_descriptor_content() handlign of 'opt'
keyword
--------------------+-------------------------------------------------------
 Reporter:  eoinof  |          Owner:  atagar
     Type:  defect  |         Status:  new   
 Priority:  normal  |      Milestone:        
Component:  Stem    |        Version:        
 Keywords:          |         Parent:        
   Points:          |   Actualpoints:        
--------------------+-------------------------------------------------------
 mocking.py:_get_descriptor_content() contains several bugs
 with how the opt keyword is handled.

 1)
 The attr arg is converted to a dictionary, so if more
 than one attribute is supplied using the opt keyword it is
 overwritten by the last element.

 2)
 Any args supplied using the keyword opt will not be matched to
 the corresponding keyword in header_template. This will cause
 the template be invalid.

 3)
 Any args supplied in attr to ovewrite values that use opt in the
 header_template will not be matched. This will cause the tempalte to be
 invalid.

 The easiest fix for all of the above would be to not allow use of the opt
 keyword with this function in the unit tests.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7499>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs