def update_vm_result(self, context, msg):
        args = jsonutils.loads(msg)
        agent = context.get('agent')
        port_id = args.get('port_uuid')
        result = args.get('result')
        LOG.debug('update_vm_result received from %(agent)s: '
                  '%(port_id)s %(result)s', {'agent': agent,
                                             'port_id': port_id,
                                             'result': result})

        # Add the request into queue for processing.
        event_type = 'agent.vm_result.update'
        payload = {'port_id': port_id, 'result': result}
        timestamp = time.ctime()
        data = (event_type, payload)
        # TODO(nlahouti) use value defined in constants
        pri = self.obj.PRI_LOW_START + 10
        self.obj.pqueue.put((pri, timestamp, data))
        LOG.debug('Added request vm result update into queue.')

        return 0
We can test tests found in text files using a DocFileSuite.
dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/apps/saf/server/dfa_server.py/RpcCallBacks.update_vm_result--crossover with--dataset/ETHPy150Open babble/babble/include/jython/Lib/test/test_doctest.py/test_DocFileSuite