remove test.py

This commit is contained in:
Dmitry Belyaev 2021-09-22 16:40:17 +03:00
parent f311a5788e
commit 4fd9c7330e
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3

21
test.py
View File

@ -1,21 +0,0 @@
from requests import put, get, post, delete
import json
from pprint import pformat
api='http://localhost:5000/api/v1/'
def main():
#print(api, get(api).json())
#print(api+'infobases', get(api+'infobases').json())
#print(api+'publications', get(api+'publications').json())
res = put(api+'publications', data={'name': 'test3'})
print('put', api+'publications', res.status_code, pformat(res.json()))
res = delete(api + 'publications/test3', data={'name': 'test3'})
print('delete', api + 'publications/test3', res.status_code, pformat(res.json()))
#res = get(api + 'publications/test1')
#print('GET', api + 'publications/test1', res.status_code, pformat(res.json()))
if __name__ == '__main__':
main()