File tree 1 file changed +7
-5
lines changed
services/web/server/tests/unit/isolated
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ def test_from_catalog_to_webapi_service():
64
64
"outFile" : {
65
65
"displayOrder" : 0 ,
66
66
"label" : "File" ,
67
+ "unit" : "second" ,
67
68
"description" : "Chosen File" ,
68
69
"type" : "data:*/*" ,
69
70
"fileToKeyMap" : None ,
@@ -78,13 +79,14 @@ def test_from_catalog_to_webapi_service():
78
79
replace_service_input_outputs (webapi_service , ** RESPONSE_MODEL_POLICY )
79
80
80
81
# TODO: dev checks... generalize
81
- assert webapi_service ["outputs" ]["outFile" ]["unit" ] is None
82
- assert webapi_service ["outputs" ]["outFile" ]["unitShort" ] is None
83
- assert webapi_service ["outputs" ]["outFile" ]["unitLong" ] is None
82
+ assert webapi_service ["outputs" ]["outFile" ]["unit" ] is "second"
83
+ assert webapi_service ["outputs" ]["outFile" ]["unitShort" ] is "s"
84
+ assert webapi_service ["outputs" ]["outFile" ]["unitLong" ] is "seconds"
84
85
86
+ # Trimmed!
85
87
assert "defaultValue" not in webapi_service ["outputs" ]["outFile" ]
86
88
87
- # the rest must be the same
89
+ # All None are trimmed
88
90
for field , value in catalog_service ["outputs" ]["outFile" ].items ():
89
- if field != "defaultValue" :
91
+ if field != "defaultValue" and value is not None :
90
92
assert webapi_service ["outputs" ]["outFile" ][field ] == value
You can’t perform that action at this time.
0 commit comments