77from contentstack .stack import ContentstackRegion
88from contentstack .stack import Stack
99
10- API_KEY = config .APIKEY
11- DELIVERY_TOKEN = config .DELIVERYTOKEN
10+ API_KEY = config .API_KEY
11+ DELIVERY_TOKEN = config .DELIVERY_TOKEN
1212ENVIRONMENT = config .ENVIRONMENT
1313HOST = config .HOST
1414
@@ -54,7 +54,7 @@ def test_03_stack_endpoint(self):
5454 def test_04_permission_error_api_key (self ):
5555 try :
5656 stack_local = contentstack .Stack (
57- '' , config .DELIVERYTOKEN , config .ENVIRONMENT )
57+ '' , config .DELIVERY_TOKEN , config .ENVIRONMENT )
5858 self .assertEqual (None , stack_local .api_key )
5959 except PermissionError as e :
6060 if hasattr (e , 'message' ):
@@ -63,7 +63,7 @@ def test_04_permission_error_api_key(self):
6363
6464 def test_05_permission_error_delivery_token (self ):
6565 try :
66- stack = contentstack .Stack (config .APIKEY , '' , config .ENVIRONMENT )
66+ stack = contentstack .Stack (config .API_KEY , '' , config .ENVIRONMENT )
6767 self .assertEqual (None , stack .delivery_token )
6868 except PermissionError as e :
6969 if hasattr (e , 'message' ):
@@ -73,7 +73,7 @@ def test_05_permission_error_delivery_token(self):
7373 def test_05_permission_error_environment (self ):
7474 try :
7575 stack = contentstack .Stack (
76- config .APIKEY , config .DELIVERYTOKEN , '' )
76+ config .API_KEY , config .DELIVERY_TOKEN , '' )
7777 self .assertEqual (None , stack .delivery_token )
7878 except PermissionError as e :
7979 if hasattr (e , 'message' ):
@@ -82,22 +82,22 @@ def test_05_permission_error_environment(self):
8282
8383 def test_07_get_api_key (self ):
8484 stack = contentstack .Stack (
85- config .APIKEY , config .DELIVERYTOKEN , config .ENVIRONMENT )
86- self .assertEqual (config .APIKEY , stack .get_api_key )
85+ config .API_KEY , config .DELIVERY_TOKEN , config .ENVIRONMENT )
86+ self .assertEqual (config .API_KEY , stack .get_api_key )
8787
8888 def test_08_get_delivery_token (self ):
8989 stack = contentstack .Stack (
90- config .APIKEY , config .DELIVERYTOKEN , config .ENVIRONMENT )
91- self .assertEqual (config .DELIVERYTOKEN , stack .get_delivery_token )
90+ config .API_KEY , config .DELIVERY_TOKEN , config .ENVIRONMENT )
91+ self .assertEqual (config .DELIVERY_TOKEN , stack .get_delivery_token )
9292
9393 def test_09_get_environment (self ):
9494 stack = contentstack .Stack (
95- config .APIKEY , config .DELIVERYTOKEN , config .ENVIRONMENT )
95+ config .API_KEY , config .DELIVERY_TOKEN , config .ENVIRONMENT )
9696 self .assertEqual (config .ENVIRONMENT , stack .get_environment )
9797
9898 def test_10_get_headers (self ):
9999 stack = contentstack .Stack (
100- config .APIKEY , config .DELIVERYTOKEN , config .ENVIRONMENT )
100+ config .API_KEY , config .DELIVERY_TOKEN , config .ENVIRONMENT )
101101 self .assertEqual (True , 'api_key' in stack .headers )
102102 self .assertEqual (True , 'access_token' in stack .get_headers )
103103 self .assertEqual (True , 'environment' in stack .get_headers )
@@ -186,19 +186,19 @@ def test_21_content_type(self):
186186 def test_check_region (self ):
187187 """_summary_
188188 """
189- _stack = contentstack .Stack (config .APIKEY , config .DELIVERYTOKEN , config .ENVIRONMENT ,
189+ _stack = contentstack .Stack (config .API_KEY , config .DELIVERY_TOKEN , config .ENVIRONMENT ,
190190 host = config .HOST , region = ContentstackRegion .AZURE_NA )
191191 var = _stack .region .value
192192 self .assertEqual ('azure-na' , var )
193193
194194 def test_22_check_early_access_headers (self ):
195195 stack = contentstack .Stack (
196- config .APIKEY , config .DELIVERYTOKEN , config .ENVIRONMENT , early_access = [])
196+ config .API_KEY , config .DELIVERY_TOKEN , config .ENVIRONMENT , early_access = [])
197197 self .assertEqual (True , 'x-header-ea' in stack .get_headers )
198198
199199 def test_23_get_early_access (self ):
200200 stack = contentstack .Stack (
201- config .APIKEY , config .DELIVERYTOKEN , config .ENVIRONMENT , early_access = ["taxonomy" , "teams" ])
201+ config .API_KEY , config .DELIVERY_TOKEN , config .ENVIRONMENT , early_access = ["taxonomy" , "teams" ])
202202 self .assertEqual (self .early_access , stack .get_early_access )
203203
204204 def test_stack_with_custom_logger (self ):
0 commit comments