Fix up tests so they work with py.test.