@@ -240,6 +240,25 @@ def test_google_earth_engine():
240240 assert gee_config == expected
241241
242242
243+ def test_oracle_cloud_storage ():
244+ ocs_config = order_request .oracle_cloud_storage ('ocs_access_key_id' ,
245+ 'ocs_secret_access_key' ,
246+ 'bucket' ,
247+ 'region' ,
248+ 'namespace' )
249+
250+ expected = {
251+ 'oracle_cloud_storage' : {
252+ 'customer_access_key_id' : 'ocs_access_key_id' ,
253+ 'customer_secret_key' : 'ocs_secret_access_key' ,
254+ 'bucket' : 'bucket' ,
255+ 'region' : 'region' ,
256+ 'namespace' : 'namespace'
257+ }
258+ }
259+ assert ocs_config == expected
260+
261+
243262def test__tool ():
244263 test_tool = order_request ._tool ('bandmath' , 'jsonstring' )
245264 assert test_tool == {'bandmath' : 'jsonstring' }
@@ -267,6 +286,29 @@ def test_clip_tool_invalid(point_geom_geojson):
267286 order_request .clip_tool (point_geom_geojson )
268287
269288
289+ def test_composite_tool_no_group_by ():
290+ composite_tool = order_request .composite_tool ()
291+ expected = {'composite' : {}}
292+ assert composite_tool == expected
293+
294+
295+ def test_composite_tool_group_by_strip_id ():
296+ composite_tool = order_request .composite_tool (group_by = 'strip_id' )
297+ expected = {'composite' : {'group_by' : 'strip_id' }}
298+ assert composite_tool == expected
299+
300+
301+ def test_composite_tool_group_by_order ():
302+ composite_tool = order_request .composite_tool (group_by = 'order' )
303+ expected = {'composite' : {'group_by' : 'order' }}
304+ assert composite_tool == expected
305+
306+
307+ def test_composite_tool_group_by_invalid ():
308+ with pytest .raises (exceptions .ClientError ):
309+ order_request .composite_tool (group_by = 'invalid' )
310+
311+
270312def test_reproject_tool ():
271313 rt = order_request .reproject_tool (projection = 'proj' , resolution = 5 )
272314 expected = {'reproject' : {'projection' : 'proj' , 'resolution' : 5 }}
0 commit comments