|
@ -2,7 +2,6 @@ |
|
|
|
|
|
|
|
|
import requests |
|
|
import requests |
|
|
import sys |
|
|
import sys |
|
|
import data2 |
|
|
|
|
|
import data1 |
|
|
import data1 |
|
|
|
|
|
|
|
|
baseurl = "http://127.0.0.1:5000" |
|
|
baseurl = "http://127.0.0.1:5000" |
|
@ -13,8 +12,8 @@ with session.post(baseurl + "/admin/login", {'username': 'admin', 'password': 'a |
|
|
print("Auth Failed") |
|
|
print("Auth Failed") |
|
|
sys.exit(1) |
|
|
sys.exit(1) |
|
|
|
|
|
|
|
|
for x in data1.data + data2.data: |
|
|
|
|
|
print(f"POSTing for {x}...") |
|
|
|
|
|
|
|
|
for x in data1.data: |
|
|
|
|
|
print(f"POSTing {baseurl + '/chemical/create'} for {x}...") |
|
|
req = session.post(baseurl + "/chemical/create", x) |
|
|
req = session.post(baseurl + "/chemical/create", x) |
|
|
if req.status_code != 200: |
|
|
if req.status_code != 200: |
|
|
print(f"Request Failed for {x}") |
|
|
print(f"Request Failed for {x}") |
|
|