def test_parameter_configured_message(self):
     event, context = create_parameter_event(), LambdaContextMock()
     logger = CumulusLogger()
     logger.setMetadata(event, context)
     msg = logger.createMessage("test parameter event")
     self.assertEqual(msg["sender"], context.function_name)
     self.assertEqual(msg["version"], context.function_version)
     self.assertEqual(
         msg["executions"],
         event["cma"]["event"]["cumulus_meta"]["execution_name"])
     self.assertEqual(
         msg["asyncOperationId"],
         event["cma"]["event"]["cumulus_meta"]["asyncOperationId"])
     self.assertEqual(
         msg["granules"],
         json.dumps([granule["granuleId"]
                     for granule in event["cma"]["event"]["payload"]["granules"]]))
     self.assertEqual(
         msg["parentArn"],
         event["cma"]["event"]["cumulus_meta"]["parentExecutionArn"])
     self.assertEqual(
         msg["stackName"],
         event["cma"]["event"]["meta"]["stack"])
     self.assertEqual(msg["message"], "test parameter event")
     logger.info("test parameter configured message")
 def test_logger_name_loglevel(self):
     event, context = create_event(), LambdaContextMock()
     logger = CumulusLogger('logger_test', logging.INFO)
     logger.setMetadata(event, context)
     self.assertTrue(logger.logger.getEffectiveLevel() == logging.INFO)
     logger.debug("test logging level debug")
     logger.info("test logging level info")
     logger.warning("test logging level warning")