Fix python tests