Unit test bug - mocking.py:_get_descriptor_content() handlign of 'opt' keyword
mocking.py:_get_descriptor_content() contains several bugs with how the opt keyword is handled.
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.
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.
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.
Trac:
Username: eoinof