@@ -1324,11 +1324,24 @@ def _verifyBooleanResourceProperties(self, job, config):
13241324 else :
13251325 self .assertTrue (job .use_legacy_sql is None )
13261326
1327+ def _verifyIntegerResourceProperties (self , job , config ):
1328+ if 'maximumBillingTier' in config :
1329+ self .assertEqual (job .maximum_billing_tier ,
1330+ config ['maximumBillingTier' ])
1331+ else :
1332+ self .assertTrue (job .maximum_billing_tier is None )
1333+ if 'maximumBytesBilled' in config :
1334+ self .assertEqual (job .maximum_bytes_billed ,
1335+ config ['maximumBytesBilled' ])
1336+ else :
1337+ self .assertTrue (job .maximum_bytes_billed is None )
1338+
13271339 def _verifyResourceProperties (self , job , resource ):
13281340 self ._verifyReadonlyResourceProperties (job , resource )
13291341
13301342 config = resource .get ('configuration' , {}).get ('query' )
13311343 self ._verifyBooleanResourceProperties (job , config )
1344+ self ._verifyIntegerResourceProperties (job , config )
13321345
13331346 if 'createDisposition' in config :
13341347 self .assertEqual (job .create_disposition ,
@@ -1387,6 +1400,8 @@ def test_ctor(self):
13871400 self .assertTrue (job .use_query_cache is None )
13881401 self .assertTrue (job .use_legacy_sql is None )
13891402 self .assertTrue (job .write_disposition is None )
1403+ self .assertTrue (job .maximum_billing_tier is None )
1404+ self .assertTrue (job .maximum_bytes_billed is None )
13901405
13911406 def test_from_api_repr_missing_identity (self ):
13921407 self ._setUpConstants ()
@@ -1498,6 +1513,8 @@ def test_begin_w_alternate_client(self):
14981513 'useQueryCache' : True ,
14991514 'useLegacySql' : True ,
15001515 'writeDisposition' : 'WRITE_TRUNCATE' ,
1516+ 'maximumBillingTier' : 4 ,
1517+ 'maximumBytesBilled' : 123456
15011518 }
15021519 RESOURCE ['configuration' ]['query' ] = QUERY_CONFIGURATION
15031520 conn1 = _Connection ()
@@ -1518,6 +1535,8 @@ def test_begin_w_alternate_client(self):
15181535 job .use_query_cache = True
15191536 job .use_legacy_sql = True
15201537 job .write_disposition = 'WRITE_TRUNCATE'
1538+ job .maximum_billing_tier = 4
1539+ job .maximum_bytes_billed = 123456
15211540
15221541 job .begin (client = client2 )
15231542
0 commit comments