Fix python testing scripts