[acceptance-tests] Convert Ruby script to Python