Test REST API with python