<s> import os <EOL> from google . appengine . ext import testbed as gaetestbed <EOL> import main <EOL> import webtest <EOL> def test_app ( testbed ) : <EOL> key_name = '<STR_LIT:foo>' <EOL> testbed . init_taskqueue_stub ( root_path = os . path . dirname ( __file__ ) ) <EOL> app = webtest . TestApp ( main . app ) <EOL> app . post ( '<STR_LIT:/>' , { '<STR_LIT:key>' : key_name } ) <EOL> tq_stub = testbed . get_stub ( gaetestbed . TASKQUEUE_SERVICE_NAME ) <EOL> tasks = tq_stub . get_filtered_tasks ( ) <EOL> assert len ( tasks ) == <NUM_LIT:1> <EOL> assert tasks [ <NUM_LIT:0> ] . name == '<STR_LIT>' </s>
