BmnRoot
Loading...
Searching...
No Matches
publish_test_results.py
Go to the documentation of this file.
1import requests
2import json
3import base64
4import os
5
6url = 'https://bmn.jinr.int/wp-json/wp/v2'
7header = {'Authorization': 'Basic ' + os.environ.get('DOCS_CREDENTIALS')}
8postID = os.environ.get('DOCS_ALL_MACROS_POST_ID')
9
10json_data = None
11with open('result.json') as json_file:
12 json_data = json.load(json_file)
13
14result = requests.post(url + "/pages/" + postID , headers=header, json=json_data)