File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 11"""Tests for pystac.extensions.sar."""
22
33import datetime
4+ from random import choice
45from typing import List
56import unittest
67
8+ from string import ascii_letters
9+
710import pystac
811from pystac .extensions import sar
912from pystac .extensions .sar import SarExtension
@@ -180,6 +183,16 @@ def test_asset_ext_add_to(self) -> None:
180183
181184 self .assertIn (SarExtension .get_schema_uri (), item .stac_extensions )
182185
186+ def test_should_return_none_when_observation_direction_is_not_set (self ) -> None :
187+ extension = SarExtension .ext (self .item )
188+ extension .apply (
189+ choice (ascii_letters ),
190+ choice (list (sar .FrequencyBand )),
191+ [],
192+ choice (ascii_letters ),
193+ )
194+ self .assertIsNone (extension .observation_direction )
195+
183196
184197if __name__ == "__main__" :
185198 unittest .main ()
You can’t perform that action at this time.
0 commit comments