#NEWLINE# def test_begin_w_bound_client( self ) : #NEWLINE# #INDENT# PATH = ( 'projects/%s/jobs' % self . PROJECT ) #NEWLINE# RESOURCE = self . _makeResource ( ) #NEWLINE# del RESOURCE [ 'statistics' ] [ 'creationTime' ] #NEWLINE# del RESOURCE [ 'etag' ] #NEWLINE# del RESOURCE [ 'selfLink' ] #NEWLINE# del RESOURCE [ 'user_email' ] #NEWLINE# conn = _Connection ( RESOURCE ) #NEWLINE# client = _Client ( project = self . PROJECT , connection = conn ) #NEWLINE# table = _Table ( ) #NEWLINE# job = self . _makeOne ( self . JOB_NAME , self , [ self . SOURCE1 ] , client ) #NEWLINE# job . begin ( ) #NEWLINE# self . assertEqual ( len ( conn . _requested ) , 1 ) #NEWLINE# req = conn . _requested [ 0 ] #NEWLINE# self . assertEqual ( req [ 'method' ] , 'POST' ) #NEWLINE# self . assertEqual ( req [ 'path' ] , ( '/%s' % PATH ) ) #NEWLINE# SENT = { #NEWLINE# #INDENT# 'jobReference' : { #NEWLINE# #INDENT# 'projectId' : self . PROJECT , #NEWLINE# 'jobId' : self . JOB_NAME , #NEWLINE# #UNINDENT# } , #NEWLINE# 'configuration' : { #NEWLINE# #INDENT# 'load' : { #NEWLINE# #INDENT# 'sourceUris' : [ self . SOURCE1 ] , #NEWLINE# 'destinationTable' : { #NEWLINE# #INDENT# 'projectId' : self . PROJECT , #NEWLINE# 'datasetId' : self . DS_NAME , #NEWLINE# 'tableId' : self . TABLE_NAME , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertEqual ( req [ 'data' ] , SENT ) #NEWLINE# self . _verifyResourceProperties ( job , RESOURCE )