I'm not sure if the language I'm using makes a difference or not, but for the record it's python (2.7.3).
I recently tried to add functionality to a project I forked on GitHub. Specifically, I changed the underlying http request library from httplib2 to requests, so that I could easily add proxies to requests. The resultant function calls changed slightly (more variables passed and in a slightly different order), and the mock unit test calls failed as a result. What's the best approach to resolving this? Is it OK to just jump in and rewrite the unit test so that they pass with the new function calls? Intuitively, that would seem to be undermining the purpose of unit tests somewhat.
The purpose of a unit test is to verify the implementation of a requirement. As any other piece of software, you have to distinguish what the unit test does, how it tests the requirement (roughly speaking its design), and how it is implemented. Unless the requirement itself is changed, the design of the unit test should not be changed. However, it may happen that a change from another requirement impacts its implementation (because of side effect, interface change, etc.). Then according to your process, you may let the new implementation be reviewed to make sure that the change doesn't impact the nature of the test and that the original requirement is still fulfilled.
Changing unit tests based on added functionality