def METHOD_NAME(self):
    # tests getting last command result
    args = ['??']
    self.shell.last.result = {'x': 'result'}
    flag = self.shell.handle_jmespath_query(args)
    self.assertTrue(flag)
    self.assertEqual(json.loads(self.stream.getvalue()), {'x': 'result'})