s3-selftest convert tests.sh to python