Restructure and convert all tests to py.test