From 2421c18414aab03b3088a242a2fff8eb325cda46 Mon Sep 17 00:00:00 2001 From: shamly majeed Date: Wed, 27 Mar 2024 09:50:30 +0100 Subject: [PATCH] Fix the error in test_verify_json_payloads for bufr files --- ingest/test/test_verify_json_payloads.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ingest/test/test_verify_json_payloads.py b/ingest/test/test_verify_json_payloads.py index f1bcaa93..c87a3619 100644 --- a/ingest/test/test_verify_json_payloads.py +++ b/ingest/test/test_verify_json_payloads.py @@ -23,8 +23,10 @@ def test_verify_json_payload_bufr(bufr_file_path): init_oscar_py("./src/ingest/bufr/oscar/oscar_stations_all.json") init_bufr_schema_py("./src/ingest/schemas/bufr_to_e_soh_message.json") msg_build = IngestToPipeline(None, "testing", testing=True) + with open(bufr_file_path, "rb") as file: + bufr_content = file.read() - json_payloads = msg_build._build_messages(bufr_file_path, input_type="bufr") + json_payloads = msg_build._build_messages(bufr_content, input_type="bufr") for payload in json_payloads: try: