File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ def setUp(self):
9
9
10
10
def test_api_key (self ):
11
11
""" initialize zencoder object and test api key """
12
- api_key = 'abcd123 '
12
+ api_key = 'testapikey '
13
13
zc = Zencoder (api_key = api_key )
14
14
self .assertEquals (zc .api_key , api_key )
15
15
@@ -19,6 +19,21 @@ def test_api_key_env_var(self):
19
19
zc = Zencoder ()
20
20
self .assertEquals (zc .api_key , 'abcd123' )
21
21
22
+ def test_default_api_version (self ):
23
+ os .environ ['ZENCODER_API_KEY' ] = 'abcd123'
24
+ zc = Zencoder ()
25
+ self .assertEquals (zc .base_url , 'https://app.zencoder.com/api/v2/' )
26
+
27
+ def test_set_api_version (self ):
28
+ os .environ ['ZENCODER_API_KEY' ] = 'abcd123'
29
+ zc = Zencoder (api_version = 'v1' )
30
+ self .assertEquals (zc .base_url , 'https://app.zencoder.com/api/v1/' )
31
+
32
+ def test_set_api_edge_version (self ):
33
+ os .environ ['ZENCODER_API_KEY' ] = 'abcd123'
34
+ zc = Zencoder (api_version = 'edge' )
35
+ self .assertEquals (zc .base_url , 'https://app.zencoder.com/api/' )
36
+
22
37
if __name__ == "__main__" :
23
38
unittest .main ()
24
39
You can’t perform that action at this time.
0 commit comments