saltstack/salt — pull request #6345 by s0undt3ch (2013-07-27 15:05:42+00:00)
Title: PIP module and state test cases, and minor improvments

* Test the deprecated `runas` argument to `salt.modules.pip`.
* Always show the deprecation message `runas` is not `None`.
* If both `user` and `runas` are used, that's an error! Full Stop!
* If `runas` is being used and `user` is not, adapt the code and don't fail.
* Also deprecate `runas` on `salt.states.pip`. Added mock tests to check if the deprecation is triggered, and to see if the deprecation is also returned to the user in a warnings key.
* Added test case to see if the usage of `user` and `runas` at the same time raises an exception.