Fixed all pytest/nosetest tests to work.