def METHOD_NAME(loglines):
    for line in loglines:
        database = Mock('cursor')
        database.fetchone = lambda: [random.randint(1, 10000)]
        def execute(sql, params=()):
            return sql % params
        database.execute = execute
        message = logengine.create_message(line)
        assert message, "unparseable: %s" % line
        logengine.insert_message(message, database, {}, {}, {}, {}, {}, {})