Move to py.test fixtures and simpler tests