def test_SkyQuery_waitForJob(self):
     jobId = SkyQuery.submitJob(query=SkyQuery_Query, queue="quick")
     jobDescription = SkyQuery.waitForJob(jobId=jobId, verbose=True)
     self.assertEqual(jobDescription["status"], "completed")
# In[ ]:

#get status of a submitted job

jobId = SkyQuery.submitJob(query=SkyQuery_Query, queue="quick")
jobDescription = SkyQuery.getJobStatus(jobId=jobId)
print(jobDescription)


# In[ ]:

# wait for a job to be finished and then get the status

jobId = SkyQuery.submitJob(query=SkyQuery_Query, queue="quick")
jobDescription = SkyQuery.waitForJob(jobId=jobId, verbose=True)
print("jobDescription=")
print(jobDescription)


# In[ ]:

# cancel a job that is running, and then get its status

jobId = SkyQuery.submitJob(query=SkyQuery_Query, queue="long")
isCanceled = SkyQuery.cancelJob(jobId)
print(isCanceled)
print("job status:")
print(SkyQuery.getJobStatus(jobId=jobId))