fixed python tests for py.test