def runTest(self): output = S3Output(name=self.s3_configuration.get('name'), host=self.s3_configuration.get('host'), access_key=self.s3_configuration.get('access_key'), secret_key=self.s3_configuration.get('secret_key'), bucket='', prefix=self.s3_configuration.get('prefix'), region=self.s3_configuration.get('region'), make_public=self.s3_configuration.get('make_public')) with self.assertRaises(BitcodinBadRequestError): result = create_output(output)
def runTest(self): output = S3Output( name=self.s3_configuration.get('name'), host=self.s3_configuration.get('host'), access_key=self.s3_configuration.get('access_key'), secret_key=self.s3_configuration.get('secret_key'), bucket=self.s3_configuration.get('bucket'), prefix=self.s3_configuration.get('prefix'), region=self.s3_configuration.get('region'), make_public=self.s3_configuration.get('make_public') ) self.output = create_output(output) self.assertEquals(self.output.name, self.s3_configuration['name']) self.assertEquals(self.output.bucket, self.s3_configuration.get('bucket')) self.assertEquals(self.output.prefix, self.s3_configuration.get('prefix')) self.assertEquals(self.output.region, self.s3_configuration.get('region')) self.assertEquals(self.output.make_public, self.s3_configuration.get('make_public'))
def setUp(self): super(TransferJobToS3TestCase, self).setUp() self.maxDiff = None input_url = test_video_url input = Input(input_url) self.input = create_input(input) audio_stream_config = AudioStreamConfig(default_stream_id=0, bitrate=192000) video_stream_config = VideoStreamConfig(default_stream_id=0, bitrate=512000, profile='Main', preset='premium', height=480, width=640) encoding_profile = EncodingProfile('API Test Profile', [video_stream_config], [audio_stream_config]) self.encoding_profile = create_encoding_profile(encoding_profile) self.manifests = ['m3u8', 'mpd'] job = Job( input_id=self.input.input_id, encoding_profile_id=self.encoding_profile.encoding_profile_id, manifest_types=self.manifests, speed='standard' ) self.job = create_job(job) self.s3_configuration = { 'name': 'Python API Test Output', 'host': s3_output_config.get('host', None), 'access_key': s3_output_config.get('access_key', None), 'secret_key': s3_output_config.get('secret_key', None), 'bucket': s3_output_config.get('bucket', None), 'prefix': s3_output_config.get('prefix', None), 'region': s3_output_config.get('region', None), 'make_public': False } output = S3Output( name=self.s3_configuration.get('name'), host=self.s3_configuration.get('host'), access_key=self.s3_configuration.get('access_key'), secret_key=self.s3_configuration.get('secret_key'), bucket=self.s3_configuration.get('bucket'), prefix=self.s3_configuration.get('prefix'), region=self.s3_configuration.get('region'), make_public=self.s3_configuration.get('make_public') ) self.output = create_output(output)
def setUp(self): super(DeleteS3OutputTestCase, self).setUp() self.s3_configuration = { 'name': 'Python API Test Output', 'host': s3_output_config.get('host', None), 'access_key': s3_output_config.get('access_key', None), 'secret_key': s3_output_config.get('secret_key', None), 'bucket': s3_output_config.get('bucket', None), 'prefix': s3_output_config.get('prefix', None), 'region': s3_output_config.get('region', None), 'make_public': False } output = S3Output(name=self.s3_configuration.get('name'), host=self.s3_configuration.get('host'), access_key=self.s3_configuration.get('access_key'), secret_key=self.s3_configuration.get('secret_key'), bucket=self.s3_configuration.get('bucket'), prefix=self.s3_configuration.get('prefix'), region=self.s3_configuration.get('region'), make_public=self.s3_configuration.get('make_public')) self.output = create_output(output)