def get_jids_filter(count, filter_find_job=True):
    with _get_serv(ret=None, commit=True) as cur:

        sql = '''SELECT * FROM (
                     SELECT DISTINCT `jid` ,`load` FROM `jids`
                     {0}
                     ORDER BY `jid` DESC limit {1}
                     ) `tmp`
                 ORDER BY `jid`;'''
        where = '''WHERE `load` NOT LIKE '%"fun": "saltutil.find_job"%' '''

        cur.execute(sql.format(where if filter_find_job else '', count))
        data = cur.fetchall()
        ret = []
        for jid in data:
            ret.append(salt.utils.jid.format_jid_instance_ext(jid[0],
                                                              json.loads(jid[1])))
        return ret
Mock send response to make testing narrowed down and simpler.
dataset/ETHPy150Open saltstack/salt/salt/returners/mysql.py/get_jids_filter--crossover with--dataset/ETHPy150Open bfrog/whizzer/whizzer/test/test_rpc_pickle.py/TestPickleProtocol.mock_send_response