def get_tasks(queue_name='<STR_LIT:default>'):
taskqueue_stub = apiproxy_stub_map.apiproxy.GetStub('<STR_LIT>')<EOL>stub_globals = taskqueue_stub.GetTasks.func_globals<EOL>old_format = stub_globals['<STR_LIT>']<EOL>stub_globals['<STR_LIT>'] =lambda x: datetime.datetime.utcfromtimestamp(x / <NUM_LIT>)<EOL>try:<EOL><INDENT>task_list = taskqueue_stub.GetTasks(queue_name)<EOL><DEDENT>finally:<EOL><INDENT>stub_globals['<STR_LIT>'] = old_format<EOL><DEDENT>adjusted_task_list = []<EOL>for task in task_list:<EOL><INDENT>for header, value in task['<STR_LIT>']:<EOL><INDENT>if (header == '<STR_LIT>' and<EOL>value == '<STR_LIT>'):<EOL><INDENT>task['<STR_LIT>'] = cgi.parse_qs(base64.b64decode(task['<STR_LIT:body>']))<EOL>break<EOL><DEDENT><DEDENT>adjusted_task_list.append(task)<EOL><DEDENT>return adjusted_task_list<EOL>
Gets pending tasks from a queue, adding a 'params' dictionary to them.

    Code originally from:
      http://code.google.com/p/pubsubhubbub/source/browse/trunk/hub/testutil.py