@@ -63,7 +63,7 @@ def test_get_dict_repr_sdk(self):
63
63
dict_repr ,
64
64
[
65
65
'{"direction": "IN", '
66
- '"dataType": null, " type": "blob", '
66
+ '"type": "blob", '
67
67
'"properties": '
68
68
'{"SupportsDeferredBinding": true}}'
69
69
],
@@ -98,7 +98,7 @@ def test_get_dict_repr_non_sdk(self):
98
98
dict_repr ,
99
99
[
100
100
'{"direction": "IN", '
101
- '"dataType": null, " type": "blob", '
101
+ '"type": "blob", '
102
102
'"properties": '
103
103
'{"SupportsDeferredBinding": false}}'
104
104
],
@@ -138,9 +138,9 @@ def test_get_dict_repr_binding_name_none(self):
138
138
self .assertEqual (
139
139
dict_repr ,
140
140
[
141
- '{"direction": "IN", "dataType": null, " type": "blob", '
141
+ '{"direction": "IN", "type": "blob", '
142
142
'"properties": {"SupportsDeferredBinding": false}}' ,
143
- '{"direction": "OUT", "dataType": null, " type": "httpResponse", '
143
+ '{"direction": "OUT", "type": "httpResponse", '
144
144
'"properties": {"SupportsDeferredBinding": false}}' ,
145
145
],
146
146
)
@@ -175,8 +175,46 @@ def test_get_dict_repr_init_params(self):
175
175
self .assertEqual (
176
176
dict_repr ,
177
177
[
178
- '{"direction": "IN", "dataType": null, '
179
- '"type": "blob", "test": null, "properties": '
178
+ '{"direction": "IN", '
179
+ '"type": "blob", "properties": '
180
+ '{"SupportsDeferredBinding": true}}'
181
+ ],
182
+ )
183
+
184
+ self .assertEqual (logs , {"client" : {sdkType .SdkType : "True" }})
185
+
186
+ def test_get_dict_repr_clean_nones (self ):
187
+ # Create mock blob
188
+ meta ._ConverterMeta ._bindings = {"blob" }
189
+
190
+ # Create test binding
191
+ mock_blob = MockInitParams (
192
+ name = "client" ,
193
+ direction = utils .BindingDirection .IN ,
194
+ data_type = None ,
195
+ type = "blob" ,
196
+ path = None ,
197
+ init_params = ["test" , "type" , "direction" , "path" ],
198
+ )
199
+
200
+ # Create test input_types dict
201
+ mock_input_types = {
202
+ "client" : MockParamTypeInfo (
203
+ binding_name = "blobTrigger" , pytype = sdkType .SdkType
204
+ )
205
+ }
206
+
207
+ # Create test indexed_function
208
+ mock_indexed_functions = MockFunction (bindings = [mock_blob ])
209
+
210
+ dict_repr , logs = utils .get_raw_bindings (
211
+ mock_indexed_functions , mock_input_types
212
+ )
213
+ self .assertEqual (
214
+ dict_repr ,
215
+ [
216
+ '{"direction": "IN", '
217
+ '"type": "blob", "properties": '
180
218
'{"SupportsDeferredBinding": true}}'
181
219
],
182
220
)
0 commit comments