@@ -49,35 +49,34 @@ def test_06_entry_params(self):
4949 self .assertEqual ('param_value' , entry .entry_param ['param_key' ])
5050
5151 def test_07_entry_base_only (self ):
52- entry = self .stack .content_type (COMPLEX_CONTENT_TYPE_UID ).entry (COMPLEX_ENTRY_UID ).only ('field_UID ' )
52+ entry = self .stack .content_type (COMPLEX_CONTENT_TYPE_UID ).entry (COMPLEX_ENTRY_UID ).only ('title ' )
5353 entry .fetch ()
5454 self .assertEqual ({'environment' : 'development' ,
55- 'only[BASE][]' : 'field_UID ' }, entry .entry_param )
55+ 'only[BASE][]' : 'title ' }, entry .entry_param )
5656
5757 def test_08_entry_base_excepts (self ):
58- entry = self .stack .content_type (COMPLEX_CONTENT_TYPE_UID ).entry (COMPLEX_ENTRY_UID ).excepts ('field_UID ' )
58+ entry = self .stack .content_type (COMPLEX_CONTENT_TYPE_UID ).entry (COMPLEX_ENTRY_UID ).excepts ('title ' )
5959 entry .fetch ()
6060 self .assertEqual ({'environment' : 'development' ,
61- 'except[BASE][]' : 'field_UID ' }, entry .entry_param )
61+ 'except[BASE][]' : 'title ' }, entry .entry_param )
6262
6363 def test_10_entry_base_include_reference_only (self ):
64- entry = self .stack .content_type (COMPLEX_CONTENT_TYPE_UID ).entry (COMPLEX_ENTRY_UID ).only ('field1 ' )
64+ entry = self .stack .content_type (COMPLEX_CONTENT_TYPE_UID ).entry (COMPLEX_ENTRY_UID ).only ('title ' )
6565 entry .fetch ()
66- self .assertEqual ({'environment' : 'development' , 'only[BASE][]' : 'field1 ' },
66+ self .assertEqual ({'environment' : 'development' , 'only[BASE][]' : 'title ' },
6767 entry .entry_param )
6868
6969 def test_11_entry_base_include_reference_excepts (self ):
70- entry = self .stack .content_type (COMPLEX_CONTENT_TYPE_UID ).entry (COMPLEX_ENTRY_UID ).excepts ('field1 ' )
70+ entry = self .stack .content_type (COMPLEX_CONTENT_TYPE_UID ).entry (COMPLEX_ENTRY_UID ).excepts ('title ' )
7171 entry .fetch ()
72- self .assertEqual ({'environment' : 'development' , 'except[BASE][]' : 'field1 ' },
72+ self .assertEqual ({'environment' : 'development' , 'except[BASE][]' : 'title ' },
7373 entry .entry_param )
7474
7575 def test_12_entry_include_reference_github_issue (self ):
7676 stack_for_products = contentstack .Stack (
77- "API_KEY" , "DELIVERY_TOKEN" , "ENVIRONMENT" )
78- _entry = stack_for_products .content_type ('product' ).entry ("ENTRY_UI" ).include_reference (
79- ["categories" ,
80- "brand" ])
77+ config .API_KEY , config .DELIVERY_TOKEN , config .ENVIRONMENT , host = config .HOST )
78+ _entry = stack_for_products .content_type (config .COMPLEX_CONTENT_TYPE_UID ).entry (config .COMPLEX_ENTRY_UID ).include_reference (
79+ ["authors" , "related_content" ])
8180 response = _entry .fetch ()
8281
8382 def test_13_entry_support_include_fallback_unit_test (self ):
@@ -182,8 +181,8 @@ def test_28_entry_only_multiple_fields(self):
182181 """Test entry only with multiple field calls"""
183182 entry = (self .stack .content_type (COMPLEX_CONTENT_TYPE_UID )
184183 .entry (COMPLEX_ENTRY_UID )
185- .only ('field1 ' )
186- .only ('field2 ' ))
184+ .only ('title ' )
185+ .only ('url ' ))
187186 entry .fetch ()
188187 # Note: Multiple only calls may overwrite or append
189188 self .assertIn ('only[BASE][]' , entry .entry_param )
@@ -192,8 +191,8 @@ def test_29_entry_excepts_multiple_fields(self):
192191 """Test entry excepts with multiple field calls"""
193192 entry = (self .stack .content_type (COMPLEX_CONTENT_TYPE_UID )
194193 .entry (COMPLEX_ENTRY_UID )
195- .excepts ('field1 ' )
196- .excepts ('field2 ' ))
194+ .excepts ('title ' )
195+ .excepts ('url ' ))
197196 entry .fetch ()
198197 # Note: Multiple excepts calls may overwrite or append
199198 self .assertIn ('except[BASE][]' , entry .entry_param )
@@ -291,8 +290,8 @@ def test_38_entry_only_and_excepts_together(self):
291290 """Test entry with both only and excepts"""
292291 entry = (self .stack .content_type (COMPLEX_CONTENT_TYPE_UID )
293292 .entry (COMPLEX_ENTRY_UID )
294- .only ('field1 ' )
295- .excepts ('field2 ' ))
293+ .only ('title ' )
294+ .excepts ('url ' ))
296295 entry .fetch ()
297296 self .assertIn ('only[BASE][]' , entry .entry_param )
298297 self .assertIn ('except[BASE][]' , entry .entry_param )
@@ -301,7 +300,7 @@ def test_39_entry_include_reference_with_multiple_fields(self):
301300 """Test entry include_reference with multiple fields"""
302301 entry = (self .stack .content_type (COMPLEX_CONTENT_TYPE_UID )
303302 .entry (COMPLEX_ENTRY_UID )
304- .include_reference (['field1 ' , 'field2 ' , 'field3 ' ]))
303+ .include_reference (['title ' , 'url ' , 'date ' ]))
305304 result = entry .fetch ()
306305 self .assertIsNotNone (result )
307306
@@ -350,8 +349,8 @@ def test_46_entry_all_queryable_methods_combined(self):
350349 entry = (self .stack .content_type (COMPLEX_CONTENT_TYPE_UID )
351350 .entry (COMPLEX_ENTRY_UID )
352351 .locale ('en-us' )
353- .only ('field1 ' )
354- .excepts ('field2 ' )
352+ .only ('title ' )
353+ .excepts ('url ' )
355354 .include_reference (['ref1' , 'ref2' ])
356355 .include_content_type ()
357356 .include_reference_content_type_uid ()
0 commit comments