More fixes for python tests.