saltstack/salt — pull request #2943 by ryanschneider (2012-12-19 01:46:46+00:00)
Title: Some minor cleanup of unit and integration tests.

I ran into a couple issues with the tests:

- the rvm unit test was bombing trying to resolve __salt__[config.option]. I'm not 100% sure I resolved the issue correctly.

- os.getlogin() seems particularly buggy on Gentoo. See: http://mail.python.org/pipermail/python-bugs-list/2002-July/012691.html I worked around this in the cmdmod module integration test.

- When portage runs a packages unit tests they prefer they use ${TMPDIR}. Added support for this. Currently portage sets ${TMPDIR} to /tmp so this isn't strictly necessary.

- The integration.states.match test was only working for me as root. Added the same skipIf as other tests requiring root.

- My terminal (Terminator) was bombing trying to print Unicode arrows and stars, I replaced those with -> and *. in print_header().