File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -355,7 +355,7 @@ def run(self, client=None):
355
355
:param client: the client to use. If not passed, falls back to the
356
356
``client`` stored on the current dataset.
357
357
"""
358
- if self ._job is not None :
358
+ if self .job is not None :
359
359
raise ValueError ("Query job is already running." )
360
360
361
361
client = self ._require_client (client )
Original file line number Diff line number Diff line change @@ -394,6 +394,15 @@ def test_run_w_already_has_job(self):
394
394
with self .assertRaises (ValueError ):
395
395
query .run ()
396
396
397
+ def test_run_w_already_has_job_in_properties (self ):
398
+ JOB_ID = 'JOB_ID'
399
+ conn = _Connection ()
400
+ client = _Client (project = self .PROJECT , connection = conn )
401
+ query = self ._make_one (self .QUERY , client )
402
+ query ._properties ['jobReference' ] = {'jobId' : JOB_ID }
403
+ with self .assertRaises (ValueError ):
404
+ query .run ()
405
+
397
406
def test_run_w_bound_client (self ):
398
407
PATH = 'projects/%s/queries' % self .PROJECT
399
408
RESOURCE = self ._makeResource (complete = False )
You can’t perform that action at this time.
0 commit comments