File tree Expand file tree Collapse file tree 3 files changed +57
-0
lines changed
Expand file tree Collapse file tree 3 files changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "audio_sample_rate" : 44100 ,
3+ "frame_rate" : 30 ,
4+ "job_id" : 45497494 ,
5+ "channels" : " 2" ,
6+ "audio_bitrate_in_kbps" : 50 ,
7+ "height" : 720 ,
8+ "audio_codec" : " aac" ,
9+ "duration_in_ms" : 5067 ,
10+ "url" : " http://s3.amazonaws.com/zencodertesting/test.mov" ,
11+ "file_size_in_bytes" : 922620 ,
12+ "width" : 1280 ,
13+ "format" : " mpeg4" ,
14+ "state" : " finished" ,
15+ "total_bitrate_in_kbps" : 1452 ,
16+ "video_bitrate_in_kbps" : 1402 ,
17+ "id" : 45475483 ,
18+ "video_codec" : " h264" ,
19+ "privacy" : false
20+ }
Original file line number Diff line number Diff line change 1+ {
2+ "state" : " processing" ,
3+ "current_event" : " Downloading" ,
4+ "current_event_progress" : " 32.34567345" ,
5+ "progress" : " 45.2353255"
6+ }
Original file line number Diff line number Diff line change 1+ import unittest
2+ from zencoder import Zencoder
3+
4+ from mock import patch
5+
6+ from test_util import TEST_API_KEY , load_response
7+ from zencoder import Zencoder
8+
9+ class TestInputs (unittest .TestCase ):
10+ def setUp (self ):
11+ self .zen = Zencoder (api_key = TEST_API_KEY )
12+
13+ @patch ("requests.Session.get" )
14+ def test_input_details (self , get ):
15+ get .return_value = load_response (200 , 'fixtures/input_details.json' )
16+
17+ resp = self .zen .output .details (15432 )
18+ self .assertEquals (resp .code , 200 )
19+ self .assertTrue (resp .body ['id' ] > 0 )
20+
21+ @patch ("requests.Session.get" )
22+ def test_input_progress (self , get ):
23+ get .return_value = load_response (200 , 'fixtures/input_progress.json' )
24+
25+ resp = self .zen .output .progress (14325 )
26+ self .assertEquals (resp .code , 200 )
27+ self .assertEquals (resp .body ['state' ], 'processing' )
28+
29+ if __name__ == "__main__" :
30+ unittest .main ()
31+
You can’t perform that action at this time.
0 commit comments