def test_log_to_scribe(log_line): logger = Mock() log_to_scribe(logger, log_line) logger.log_line.assert_called_once_with( 'tmp_paasta_oom_events', json.dumps({ 'timestamp': log_line.timestamp, 'hostname': log_line.hostname, 'container_id': log_line.container_id, 'cluster': log_line.cluster, 'service': log_line.service, 'instance': log_line.instance, 'process_name': log_line.process_name, }), )
def test_log_to_scribe(log_line): logger = Mock() log_to_scribe(logger, log_line) logger.log_line.assert_called_once_with( "tmp_paasta_oom_events", json.dumps({ "timestamp": log_line.timestamp, "hostname": log_line.hostname, "container_id": log_line.container_id, "cluster": log_line.cluster, "service": log_line.service, "instance": log_line.instance, "process_name": log_line.process_name, }), )