Skip to content

Commit

Permalink
ci: fix trailing / in fhir server env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
migraf committed Jul 9, 2023
1 parent e7c3b52 commit 373413c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 41 deletions.
4 changes: 2 additions & 2 deletions fhir_kindling/tests/test_fhir_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@ def test_set_query_string(server, api_url):
query_string = f"/{query_resource}?_include={query_resource}:{search_param}"

query.set_query_string(query_string)
query_url = f"{api_url}{query_resource}?_include={query_resource}:{search_param}&_count=5000&_format=json"
query_url = f"{api_url}/{query_resource}?_include={query_resource}:{search_param}&_count=5000&_format=json"
assert query.query_url == query_url


Expand Down Expand Up @@ -1519,7 +1519,7 @@ def test_query_include(server, api_url):

assert query.query_parameters.include_parameters[0].resource == query_resource

query_url = f"{api_url}{query_resource}?_include={query_resource}:{search_param}&_count=5000&_format=json"
query_url = f"{api_url}/{query_resource}?_include={query_resource}:{search_param}&_count=5000&_format=json"
print(query.query_url)
assert query.query_url == query_url

Expand Down
39 changes: 0 additions & 39 deletions testing/prefill.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,45 +116,6 @@ def prefill():
print(f"uploading dataset to server 1 ({server_1.api_address})...")
dataset_2.upload(server_1)

# patients = PatientGenerator(n=count).generate()
# print(f"generated {len(patients)} patients")

# upload_bundle = Bundle.construct()
# upload_bundle.type = "transaction"
# upload_bundle.entry = []
# print("generating upload bundle for patients")
# for i, patient in enumerate(patients):
# request = BundleEntryRequest(method="POST", url="/Patient")

# entry = BundleEntry(request=request, resource=patient)
# upload_bundle.entry.append(entry)
# upload_bundle = upload_bundle.validate(upload_bundle)
# json_dict = orjson.loads(upload_bundle.json(exclude_none=True))
# print(f"uploading server 1 ({server_1.api_address})...")
# r = httpx.post(server_1.api_address, json=json_dict, timeout=None)

# print("uploading conditions...")
# condition_entries = []
# for entry in r.json()["entry"]:
# print(f"entry: {entry}")
# reference = "/".join(entry["response"]["location"].split("/")[-4:-2])
# print(f"reference: {reference}")
# covid_condition = Condition(
# code=COVID_CODE, subject=Reference(reference=reference)
# )
# request = BundleEntryRequest(method="POST", url="/Condition")

# entry = BundleEntry(request=request, resource=covid_condition)
# condition_entries.append(entry)

# upload_bundle.entry = condition_entries
# upload_bundle = upload_bundle.validate(upload_bundle)
# json_dict = orjson.loads(upload_bundle.json(exclude_none=True))
# print(f"uploading conditions server 1 ({server_1.api_address})...")
# r = httpx.post(server_1.api_address, json=json_dict, timeout=None)

# r.raise_for_status()


if __name__ == "__main__":
prefill()

0 comments on commit 373413c

Please sign in to comment.