File tree Expand file tree Collapse file tree 2 files changed +7
-22
lines changed Expand file tree Collapse file tree 2 files changed +7
-22
lines changed Original file line number Diff line number Diff line change @@ -374,12 +374,6 @@ def to_dict(
374374            "assets" : assets ,
375375        }
376376
377-         if  self .bbox  is  not   None :
378-             d ["bbox" ] =  self .bbox 
379- 
380-         if  self .stac_extensions  is  not   None :
381-             d ["stac_extensions" ] =  self .stac_extensions 
382- 
383377        if  self .collection_id :
384378            d ["collection" ] =  self .collection_id 
385379
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ def test_item_field_order(self) -> None:
112112        item  =  pystac .Item .from_file (
113113            TestCases .get_path ("data-files/item/sample-item.json" )
114114        )
115- 
115+          item_dict   =   item . to_dict ( include_self_link = False ) 
116116        expected_order  =  [
117117            "type" ,
118118            "stac_version" ,
@@ -125,21 +125,12 @@ def test_item_field_order(self) -> None:
125125            "assets" ,
126126            "collection" ,
127127        ]
128- 
129-         with  tempfile .TemporaryDirectory () as  tmp_dir :
130-             p  =  os .path .join (tmp_dir , "item.json" )
131-             item .save_object (include_self_link = False , dest_href = p )
132- 
133-             with  open (p ) as  f :
134-                 item_json  =  json .load (f )
135- 
136-             # Assert the order matches the expected order 
137-             actual_order  =  list (item_json .keys ())
138-             self .assertEqual (
139-                 actual_order ,
140-                 expected_order ,
141-                 f"Order was { actual_order }  , expected { expected_order }  " ,
142-             )
128+         actual_order  =  list (item_dict .keys ())
129+         self .assertEqual (
130+             actual_order ,
131+             expected_order ,
132+             f"Order was { actual_order }  , expected { expected_order }  " ,
133+         )
143134
144135    def  test_extra_fields (self ) ->  None :
145136        item  =  pystac .Item .from_file (
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments