def wait_until_job_finished(self, job_id):
        job_result = get_job(job_id)

        while job_result.status != 'Finished':
            job_result = get_job(job_result.job_id)
            self.assertNotEqual(job_result.status, 'Error')
            print(job_result.to_json())
            sleep(5)
 def runTest(self):
     job = get_job(self.job.job_id)
     self.assertEquals(self.job.job_id, job.job_id)
     self.assertEquals(self.job.created_at.date, self.job.created_at.date)
     self.assertEquals(self.job.encoding_profiles[0].encoding_profile_id, job.encoding_profiles[0].encoding_profile_id)
     self.assertEquals(self.job.manifest_urls.m3u8_url.strip('?')[0], job.manifest_urls.m3u8_url.strip('?')[0])
     self.assertEquals(self.job.manifest_urls.mpd_url.strip('?')[0], job.manifest_urls.mpd_url.strip('?')[0])
    default_stream_id=0,
    bitrate=1200000,
    profile='Main',
    preset='premium',
    height=480,
    width=854
))

audio_configs = [bitcodin.AudioStreamConfig(default_stream_id=0, bitrate=192000)]

encoding_profile_obj = bitcodin.EncodingProfile('API Test Profile', video_configs, audio_configs)
encoding_profile_result = bitcodin.create_encoding_profile(encoding_profile_obj)

manifests = ['mpd', 'm3u8']

job = bitcodin.Job(
    input_id=input_result.input_id,
    encoding_profile_id=encoding_profile_result.encoding_profile_id,
    manifest_types=manifests,
    speed='standard'
)
job_result = bitcodin.create_job(job)

while job_result.status != 'Finished' and job_result.status != 'Error':
    job_result = bitcodin.get_job(job_result.job_id)
    print(job_result.to_json())
    sleep(5)

print(job_result.to_json())
print("Job Finished!")
 def runTest(self):
     with self.assertRaises(BitcodinNotFoundError):
         get_job(0)
    def test_get_job(self):
        jobs = bitcodin.list_jobs()
        self.assertGreater(len(jobs), 0)

        single_job = bitcodin.get_job(jobs[0].job_id)
        self.assertEqual(jobs[0].job_id, single_job.job_id)