File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ stdout*
10
10
.idea
11
11
.vscode
12
12
13
+
13
14
# Sphinx documentation
14
15
.ipynb_checkpoints /
15
16
Original file line number Diff line number Diff line change @@ -68,6 +68,35 @@ def test_identify_non_stac_raises_error(self) -> None:
68
68
69
69
self .assertIn ("JSON does not represent a STAC object" , str (ctx .exception ))
70
70
71
+ def test_identify_0_8_itemcollection (self ) -> None :
72
+ itemcollection_path = TestCases .get_path (
73
+ "data-files/examples/0.8.1/item-spec/"
74
+ "examples/itemcollection-sample-full.json"
75
+ )
76
+ itemcollection_dict = pystac .StacIO .default ().read_json (itemcollection_path )
77
+
78
+ self .assertEqual (
79
+ identify_stac_object_type (itemcollection_dict ),
80
+ pystac .STACObjectType .ITEMCOLLECTION ,
81
+ )
82
+
83
+ def test_identify_0_9_itemcollection (self ) -> None :
84
+ itemcollection_path = TestCases .get_path (
85
+ "data-files/examples/0.9.0/item-spec/"
86
+ "examples/itemcollection-sample-full.json"
87
+ )
88
+ itemcollection_dict = pystac .StacIO .default ().read_json (itemcollection_path )
89
+
90
+ self .assertEqual (
91
+ identify_stac_object_type (itemcollection_dict ),
92
+ pystac .STACObjectType .ITEMCOLLECTION ,
93
+ )
94
+
95
+ def test_identify_invalid_with_stac_version (self ) -> None :
96
+ not_stac = {"stac_version" : "0.9.0" , "type" : "Custom" }
97
+
98
+ self .assertIsNone (identify_stac_object_type (not_stac ))
99
+
71
100
72
101
class VersionTest (unittest .TestCase ):
73
102
def test_version_ordering (self ) -> None :
You can’t perform that action at this time.
0 commit comments