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(
374
374
"assets" : assets ,
375
375
}
376
376
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
-
383
377
if self .collection_id :
384
378
d ["collection" ] = self .collection_id
385
379
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ def test_item_field_order(self) -> None:
112
112
item = pystac .Item .from_file (
113
113
TestCases .get_path ("data-files/item/sample-item.json" )
114
114
)
115
-
115
+ item_dict = item . to_dict ( include_self_link = False )
116
116
expected_order = [
117
117
"type" ,
118
118
"stac_version" ,
@@ -125,21 +125,12 @@ def test_item_field_order(self) -> None:
125
125
"assets" ,
126
126
"collection" ,
127
127
]
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
+ )
143
134
144
135
def test_extra_fields (self ) -> None :
145
136
item = pystac .Item .from_file (
You can’t perform that action at this time.
0 commit comments