<s> """<STR_LIT>""" <EOL> import unittest <EOL> import google <EOL> import mox <EOL> import webapp2 <EOL> from google . appengine . api import apiproxy_stub_map <EOL> from google . appengine . api . taskqueue import taskqueue_service_pb <EOL> from google . appengine . tools . devappserver2 . admin import admin_request_handler <EOL> from google . appengine . tools . devappserver2 . admin import taskqueue_queues_handler <EOL> from google . appengine . tools . devappserver2 . admin import taskqueue_utils <EOL> class TestTaskQueueQueuesHandler ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> self . mox = mox . Mox ( ) <EOL> self . mox . StubOutWithMock ( taskqueue_utils . QueueInfo , '<STR_LIT>' ) <EOL> self . mox . StubOutWithMock ( admin_request_handler . AdminRequestHandler , <EOL> '<STR_LIT>' ) <EOL> def tearDown ( self ) : <EOL> self . mox . UnsetStubs ( ) <EOL> def test_get ( self ) : <EOL> queue1 = taskqueue_utils . QueueInfo ( <EOL> name = '<STR_LIT>' , <EOL> mode = taskqueue_service_pb . TaskQueueMode . PUSH , <EOL> rate = '<STR_LIT>' , <EOL> bucket_size = <NUM_LIT:20> , <EOL> tasks_in_queue = <NUM_LIT:10> , <EOL> oldest_eta_usec = - <NUM_LIT:1> ) <EOL> queue2 = taskqueue_utils . QueueInfo ( <EOL> name = '<STR_LIT>' , <EOL> mode = taskqueue_service_pb . TaskQueueMode . PUSH , <EOL> rate = '<STR_LIT>' , <EOL> bucket_size = <NUM_LIT:20> , <EOL> tasks_in_queue = <NUM_LIT:10> , <EOL> oldest_eta_usec = - <NUM_LIT:1> ) <EOL> queue3 = taskqueue_utils . QueueInfo ( <EOL> name = '<STR_LIT>' , <EOL> mode = taskqueue_service_pb . TaskQueueMode . PULL , <EOL> rate = '<STR_LIT>' , <EOL> bucket_size = <NUM_LIT:20> , <EOL> tasks_in_queue = <NUM_LIT:10> , <EOL> oldest_eta_usec = - <NUM_LIT:1> ) <EOL> taskqueue_utils . QueueInfo . get ( ) . AndReturn ( [ queue1 , queue2 , queue3 ] ) <EOL> request = webapp2 . Request . blank ( '<STR_LIT>' ) <EOL> response = webapp2 . Response ( ) <EOL> handler = taskqueue_queues_handler . TaskQueueQueuesHandler ( request , response ) <EOL> handler . render ( '<STR_LIT>' , <EOL> { '<STR_LIT>' : [ queue1 , queue2 ] , <EOL> '<STR_LIT>' : [ queue3 ] } ) <EOL> self . mox . ReplayAll ( ) <EOL> handler . get ( ) <EOL> self . mox . VerifyAll ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
