Converted some tests to py.test.