You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
976 B

import requests
import json
from config import url_base
def test_doc_get():
response = requests.get(url_base() + "/api/Doc")
data = json.loads(response.text)
assert data["status"] == 0
for val in data["body"].values():
assert "firstName" in val
def test_doc_assistants():
doc_id = "a23f"
response = requests.get(url_base() + "/api/Doc/" + doc_id + "/assistants")
data = json.loads(response.text)
assert data["status"] == 0
for key, val in data["body"].items():
assert key == "doctorID" or "firstName" in val
if key == "doctorID":
assert val == doc_id
def test_doc_children():
doc_id = "a23f"
response = requests.get(url_base() + "/api/Doc/" + doc_id + "/children")
data = json.loads(response.text)
assert data["status"] == 0
for key, val in data["body"].items():
assert key == "doctorID" or "firstName" in val
if key == "doctorID":
assert val == doc_id