Index: shared/scripts/configuration/config.py =================================================================== diff -u -rf7bfeef1136eab7daee4c21ec1e6ee97f3412503 -r56d3408e2bce20bdbaad525bc91388fbc0130ccd --- shared/scripts/configuration/config.py (.../config.py) (revision f7bfeef1136eab7daee4c21ec1e6ee97f3412503) +++ shared/scripts/configuration/config.py (.../config.py) (revision 56d3408e2bce20bdbaad525bc91388fbc0130ccd) @@ -33,6 +33,14 @@ SALINE_UNIT = "mL" BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" +EPOCH_INDEX = 0 +CRC_INDEX = 2 +CODE_INDEX = 3 +PARAMETER_COUNT = 4 +PARAMETER_INDEX = 5 ACK_REQ_STATUS = 'Ack Req' ACK_BAK_STATUS = 'Ack Bak' + + + Index: tst_cloud_sync - treatment_screen/test.py =================================================================== diff -u -r21c0a7a1f8a705cc9bf9d7e4c904ce9694b5f623 -r56d3408e2bce20bdbaad525bc91388fbc0130ccd --- tst_cloud_sync - treatment_screen/test.py (.../test.py) (revision 21c0a7a1f8a705cc9bf9d7e4c904ce9694b5f623) +++ tst_cloud_sync - treatment_screen/test.py (.../test.py) (revision 56d3408e2bce20bdbaad525bc91388fbc0130ccd) @@ -15,7 +15,6 @@ # NOTE: # This test verifies the cloud sync - treatment screen. - import csv import names import os @@ -40,7 +39,6 @@ DEVICE_FACTORY_RESET_CONFIRM = '1639391827,1,0,1005,1,0' DEVICE_INFO_REQUEST = '1639391827,1,9,2002,0' - def verify_code_from_treatment_response(): """ @@ -73,26 +71,31 @@ def verify_log_response(actual_cloudsync_data, expected_cloudsync_data): - - test.startSection("Verification of cloud response for code %s" %actual_cloudsync_data[3]) + """ + This function is used for verifying the expected and actual cloud-sync log data. + """ + test.startSection("Verification of cloud response for code %s" %actual_cloudsync_data[config.CODE_INDEX]) expected_cloudsync_data = expected_cloudsync_data.split(',') - for index in (0, 2, 3, 4, 5): + for index in (config.EPOCH_INDEX, config.CRC_INDEX, config.CODE_INDEX, config.PARAMETER_COUNT, config.PARAMETER_INDEX): test.compare(expected_cloudsync_data[index], actual_cloudsync_data[index], "cloud sync data %s is verified" %expected_cloudsync_data[index]) test.endSection() + + def main(): - utility.append_cloudsync_credentials_file() utils.tstStart(__file__) startApplication(config.AUT_NAME) utils.waitForGUI(1.5) + set_data_in_cloud_sync_output_file(CODE_DISPLAY_REQUEST) verify_code_from_treatment_response() + set_data_in_cloud_sync_output_file(DEVICE_CREDENTIALS_REQUEST) utils.waitForGUI(3) device_credentials_response = utility.retrive_log_data() @@ -104,11 +107,6 @@ factory_reset_response = utility.retrive_log_data() verify_log_response(factory_reset_response[0], DEVICE_FACTORY_RESET_CONFIRM) - - verify_log_response() - - - utils.tstDone()