From 104a339dd46635c774a6602ccba0dd90916e35f5 Mon Sep 17 00:00:00 2001 From: Sean Hoyt Date: Fri, 16 Aug 2024 12:39:04 -0600 Subject: [PATCH] updated test_decom for new xtce generation format --- imap_processing/tests/test_decom.py | 31 +++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/imap_processing/tests/test_decom.py b/imap_processing/tests/test_decom.py index dea3644aa..2bd1d88f3 100644 --- a/imap_processing/tests/test_decom.py +++ b/imap_processing/tests/test_decom.py @@ -14,13 +14,13 @@ def test_ccsds_header(xtce_document): # Define what is expected in the XTCE document header_keys = [ - ("VERSION", "UINT3"), - ("TYPE", "UINT1"), - ("SEC_HDR_FLG", "UINT1"), - ("PKT_APID", "UINT11"), - ("SEQ_FLGS", "UINT2"), - ("SRC_SEQ_CTR", "UINT14"), - ("PKT_LEN", "UINT16"), + ("VERSION", "3"), + ("TYPE", "1"), + ("SEC_HDR_FLG", "1"), + ("PKT_APID", "11"), + ("SEQ_FLGS", "2"), + ("SRC_SEQ_CTR", "14"), + ("PKT_LEN", "16"), ] header_entry_list = ( "" @@ -40,12 +40,23 @@ def test_ccsds_header(xtce_document): # Check that each header key is defined as a Parameter for key in header_keys: - assert ( - f'' + f"\n\t\t\t\t" + f'' in document ) + assert any((old_xtce_gen, new_xtce_gen)) + # Check that the header is defined as a SequenceContainer in the XTCE file # First remove discrepancies in whitespace, tabs, and newlines header_entry_list = (