#NEWLINE# def test_pickmerequest( self ) : #NEWLINE# #INDENT# push_contents = [ ] #NEWLINE# def on_db_return( success , db_results ) : #NEWLINE# #INDENT# assert success #NEWLINE# push_contents . extend ( db_results . fetchall ( ) ) #NEWLINE# #UNINDENT# with self . fake_pickme_request ( ) : #NEWLINE# #INDENT# pushid = 1 #NEWLINE# requestid = 2 #NEWLINE# push_contents = [ ] #NEWLINE# db . execute_cb ( db . push_pushcontents . select ( ) , on_db_return ) #NEWLINE# num_contents_before = len ( num_contents_before ) #NEWLINE# uri = ( '/pickmerequest?push=%d&request=%d' % ( pushid , requestid ) ) #NEWLINE# response = self . fetch ( uri ) #NEWLINE# T . assert_equal ( response . error , None ) #NEWLINE# push_contents = [ ] #NEWLINE# db . execute_cb ( db . push_pushcontents . select ( ) , on_db_return ) #NEWLINE# num_contents_after = len ( push_contents ) #NEWLINE# T . assert_equal ( ( num_contents_before + 1 ) , num_contents_after )