Skip to content

Instantly share code, notes, and snippets.

@yaniviny
Last active January 23, 2017 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yaniviny/1835675 to your computer and use it in GitHub Desktop.
Save yaniviny/1835675 to your computer and use it in GitHub Desktop.
Update Automated Tests results to PractiTest example (Python)
import requests
headers = {
'Authorization': 'custom api_token=your_token',
'Content-Type': 'application/json',
}
data = '{ "project_id": 2, "instance_display_id": "2:1", "exit_code": 0 }'
r = requests.post("https://api.practitest.com/api/v1/automated_tests/upload_test_result.json", headers=headers, data=data)
print r.status_code
print r.text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment