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()