python api automate test