From 88aacf23c1e0966e889dd4e39f31806ee92a02fa65d02c6d4b7eeb7a449631bc Mon Sep 17 00:00:00 2001 From: PioApocalypse Date: Thu, 12 Feb 2026 11:29:40 +0100 Subject: [PATCH] aligns chained requests test with main.py (debug mode) --- tests/chained_requests.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/chained_requests.py b/tests/chained_requests.py index c8621c8..39a1e35 100644 --- a/tests/chained_requests.py +++ b/tests/chained_requests.py @@ -174,14 +174,14 @@ if __name__=="__main__": eT = eT[0] except Exception: print("Usage: i|item|items|i[ELABID] for items, e|experiment|experiments|e[ELABID] for experiments.") - pass + continue match eT: case "items" | "i" | "item": entryType = "items" case "experiments" | "e" | "exp" | "experiment": entryType = "experiments" case _: - pass + continue # This will probably be reworked in production try: elabid = elabid @@ -198,10 +198,9 @@ if __name__=="__main__": item = Entrypoint(data) elif data.get("category_title") in ["PLD Target", "Substrate"]: item = Material(data) - print(item.get_compound_formula()) + print(item.get_compound_formula(apikey)) + else: + raise Exception("The selected item or experiment is not in one of the following categories: [Sample, PLD Target, Substrate, PLD Deposition].") result = item.__dict__ result.pop("extra") - print(result) - # print(json.dumps(chain.sample_data)) - # print(json.dumps(chain.linked_experiments)) - # print(chain.batch_elabid) \ No newline at end of file + print(result) \ No newline at end of file