Fixing issues with python tests.