def test_success(self, circuits_app, base64content, expected_result):
     """ Test calling with sample values for the parameters """
     function_params = { 
         "base64content": base64content,
         "incident_id": 1001
     }
     result = call_email_parse_function(circuits_app, function_params)
     verify_subset(expected_result, result["content"])
Пример #2
0
 def test_success(self, circuits_app, incident_id, task_id, attachment_id, expected_result):
     """ Test calling with sample values for the parameters """
     function_params = { 
         "incident_id": incident_id,
         "task_id": task_id,
         "attachment_id": attachment_id
     }
     result = call_attachment_hash_function(circuits_app, function_params)
     verify_subset(expected_result, result)
 def test_success(self, circuits_app, string_to_convert_to_attachment, attachment_name, incident_id, expected_results):
     """ Test calling with sample values for the parameters """
     function_params = { 
         "string_to_convert_to_attachment": b_to_s(string_to_convert_to_attachment),
         "attachment_name": attachment_name,
         "incident_id": incident_id
     }
     results = call_utilities_string_to_attachment_function(circuits_app, function_params)
     verify_subset(expected_results, results)
Пример #4
0
 def test_success(self, circuits_app, base64content, incident_id, task_id, file_name, content_type, expected_result):
     """ Test calling with sample values for the parameters """
     function_params = { 
         "base64content": base64content,
         "incident_id": incident_id,
         "task_id": task_id,
         "file_name": file_name,
         "content_type": content_type
     }
     result = call_base64_to_attachment_function(circuits_app, function_params)
     verify_subset(expected_result, result)
    def test_success(self, circuits_app, domain_name, domain_list, expected_result):
        """ Test calling with sample values for the parameters """
        function_params = { 
            "domain_name": domain_name,
            "domain_list": domain_list
        }
        result = call_domain_distance_function(circuits_app, function_params)

        import logging
        logging.getLogger(__name__).info(expected_result)
        logging.getLogger(__name__).info(result)

        verify_subset(expected_result, result)
        assert(expected_result['closest']['name'] == result['closest']['name'])
        assert(expected_result['closest']['distance'] == result['closest']['distance'])
Пример #6
0
 def test_success(self, circuits_app, base64content, incident_id,
                  artifact_file_type, file_name, content_type, description,
                  expected_result):
     """ Test calling with sample values for the parameters """
     function_params = {
         "base64content": b_to_s(base64content),
         "incident_id": incident_id,
         "artifact_file_type": artifact_file_type,
         "file_name": file_name,
         "content_type": content_type,
         "description": description
     }
     result = call_base64_to_artifact_function(circuits_app,
                                               function_params)
     verify_subset(expected_result, result)