<s> import unittest <EOL> import os <EOL> from zencoder import Zencoder <EOL> import zencoder <EOL> class TestZencoder ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def test_api_key ( self ) : <EOL> """<STR_LIT>""" <EOL> api_key = '<STR_LIT>' <EOL> zc = Zencoder ( api_key = api_key ) <EOL> self . assertEquals ( zc . api_key , api_key ) <EOL> def test_api_key_env_var ( self ) : <EOL> """<STR_LIT>""" <EOL> os . environ [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> zc = Zencoder ( ) <EOL> self . assertEquals ( zc . api_key , '<STR_LIT>' ) <EOL> def test_default_api_version ( self ) : <EOL> os . environ [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> zc = Zencoder ( ) <EOL> self . assertEquals ( zc . base_url , '<STR_LIT>' ) <EOL> def test_set_api_version ( self ) : <EOL> os . environ [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> zc = Zencoder ( api_version = '<STR_LIT>' ) <EOL> self . assertEquals ( zc . base_url , '<STR_LIT>' ) <EOL> def test_set_api_edge_version ( self ) : <EOL> os . environ [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> zc = Zencoder ( api_version = '<STR_LIT>' ) <EOL> self . assertEquals ( zc . base_url , '<STR_LIT>' ) <EOL> def test_set_base_url ( self ) : <EOL> os . environ [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> zc = Zencoder ( base_url = '<STR_LIT>' ) <EOL> self . assertEquals ( zc . base_url , '<STR_LIT>' ) <EOL> def test_set_base_url_and_version_fails ( self ) : <EOL> os . environ [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> self . assertRaises ( zencoder . core . ZencoderError , <EOL> Zencoder , <EOL> base_url = '<STR_LIT>' , <EOL> api_version = '<STR_LIT>' ) <EOL> def test_set_timeout ( self ) : <EOL> api_key = '<STR_LIT>' <EOL> zc = Zencoder ( api_key = api_key , timeout = <NUM_LIT> ) <EOL> self . assertEquals ( zc . job . requests_params [ '<STR_LIT>' ] , <NUM_LIT> ) <EOL> def test_set_proxies ( self ) : <EOL> api_key = '<STR_LIT>' <EOL> proxies = { <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } <EOL> zc = Zencoder ( api_key = api_key , proxies = proxies ) <EOL> self . assertEquals ( zc . job . requests_params [ '<STR_LIT>' ] , proxies ) <EOL> def test_set_verify_false ( self ) : <EOL> api_key = '<STR_LIT>' <EOL> zc = Zencoder ( api_key = api_key , verify = False ) <EOL> self . assertEquals ( zc . job . requests_params [ '<STR_LIT>' ] , False ) <EOL> def test_set_cert_path ( self ) : <EOL> api_key = '<STR_LIT>' <EOL> cert = '<STR_LIT>' <EOL> zc = Zencoder ( api_key = api_key , cert = cert ) <EOL> self . assertEquals ( zc . job . requests_params [ '<STR_LIT>' ] , cert ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
