def setUp(self):
        super(AutoTransferJobToFTPTestCase, 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']
        self.ftp_configuration = {
            'name': 'Python API Test FTP Output',
            'host': ftp_output_config.get('host', None),
            'username': ftp_output_config.get('username', None),
            'password': ftp_output_config.get('password', None),
            'passive': True
        }
        output = FTPOutput(
            name=self.ftp_configuration.get('name'),
            host=self.ftp_configuration.get('host'),
            basic_auth_user=self.ftp_configuration.get('username'),
            basic_auth_password=self.ftp_configuration.get('password'),
            passive=self.ftp_configuration.get('passive'))
        self.output = create_output(output)
    def runTest(self):
        output = FTPOutput(
            name=self.ftp_configuration.get('name'),
            host='i.am.a.invalid.host.bitmovin.net/myinvalidfolder',
            basic_auth_user=self.ftp_configuration.get('username'),
            basic_auth_password=self.ftp_configuration.get('password'),
            passive=self.ftp_configuration.get('passive'))

        with self.assertRaises(BitcodinBadRequestError):
            result = create_output(output)
    def runTest(self):
        output = FTPOutput(
            name=self.ftp_configuration.get('name'),
            host='',
            basic_auth_user=self.ftp_configuration.get('username'),
            basic_auth_password=self.ftp_configuration.get('password'),
            passive=self.ftp_configuration.get('passive'))

        with self.assertRaises(BitcodinBadRequestError):
            result = create_output(output)
    def runTest(self):
        output = FTPOutput(
            name=self.ftp_configuration.get('name'),
            host=self.ftp_configuration.get('host'),
            basic_auth_user=self.ftp_configuration.get('username'),
            basic_auth_password=self.ftp_configuration.get('password'),
            passive=self.ftp_configuration.get('passive'))

        self.output = create_output(output)
        self.assertEquals(self.output.name, output.name)
        self.assertEquals(self.output.host, output.host.split('/')[0])
        self.assertEquals(self.output.passive, output.passive)
예제 #5
0
    def runTest(self):
        output = FTPOutput(
            name=self.ftp_configuration.get('name'),
            host=self.ftp_configuration.get('host'),
            basic_auth_user=self.ftp_configuration.get('username'),
            basic_auth_password=self.ftp_configuration.get('password'),
            passive=self.ftp_configuration.get('passive'))
        self.output = create_output(output)
        self.assertIsNotNone(self.output.output_id)

        delete_output(self.output.output_id)
        with self.assertRaises(BitcodinNotFoundError):
            get_output(self.output.output_id)
예제 #6
0
 def setUp(self):
     super(GetFTPOutputTestCase, self).setUp()
     self.ftp_configuration = {
         'name': 'Python API Test FTP Output',
         'host': ftp_output_config.get('host', None),
         'username': ftp_output_config.get('username', None),
         'password': ftp_output_config.get('password', None),
         'passive': True
     }
     output = FTPOutput(
         name=self.ftp_configuration.get('name'),
         host=self.ftp_configuration.get('host'),
         basic_auth_user=self.ftp_configuration.get('username'),
         basic_auth_password=self.ftp_configuration.get('password'),
         passive=self.ftp_configuration.get('passive'))
     self.output = create_output(output)