File tree Expand file tree Collapse file tree 2 files changed +27
-3
lines changed
Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ def __dict__(self) -> Dict[str, Any]:
154154 # TODO: distinguish between raster, vector and plot query rectangle
155155
156156 return {
157- 'spatial_bounds ' : {
157+ 'spatialBounds ' : {
158158 'upperLeftCoordinate' : {
159159 "x" : left_x ,
160160 "y" : upper_y ,
@@ -164,11 +164,11 @@ def __dict__(self) -> Dict[str, Any]:
164164 "y" : lower_y ,
165165 }
166166 },
167- 'time_interval ' : {
167+ 'timeInterval ' : {
168168 'start' : time_start_unix ,
169169 'end' : time_end_unix ,
170170 },
171- 'spatial_resolution ' : {
171+ 'spatialResolution ' : {
172172 'x' : self .__resolution [0 ],
173173 'y' : self .__resolution [1 ],
174174 },
Original file line number Diff line number Diff line change 22
33from datetime import datetime
44import unittest
5+ import json
56
67import requests_mock
78
@@ -43,6 +44,29 @@ def test_storing_workflow(self):
4344 request_headers = {'Authorization' : 'Bearer c4983c3e-9b53-47ae-bda9-382223bd5081' })
4445
4546 m .post ('http://mock-instance/datasetFromWorkflow/5b9508a8-bd34-5a1c-acd6-75bb832d2d38' ,
47+ additional_matcher = lambda request : request .text == json .dumps ({
48+ "name" : "Foo" ,
49+ "description" : "Bar" ,
50+ "query" : {
51+ "spatialBounds" : {
52+ "upperLeftCoordinate" : {
53+ "x" : - 180.0 ,
54+ "y" : 90.0 },
55+ "lowerRightCoordinate" : {
56+ "x" : 180.0 ,
57+ "y" : - 90.0
58+ }
59+ },
60+ "timeInterval" : {
61+ "start" : 1396353600000 ,
62+ "end" : 1396353600000
63+ },
64+ "spatialResolution" : {
65+ "x" : 1.8 ,
66+ "y" : 1.8
67+ }
68+ }
69+ }),
4670 json = {
4771 "upload" : "3086f494-d5a4-4b51-a14b-3b29f8bf7bb0" ,
4872 "dataset" : {
You can’t perform that action at this time.
0 commit comments