@@ -63,7 +63,7 @@ def test_get_dict_repr_sdk(self):
6363 dict_repr ,
6464 [
6565 '{"direction": "IN", '
66- '"dataType": null, " type": "blob", '
66+ '"type": "blob", '
6767 '"properties": '
6868 '{"SupportsDeferredBinding": true}}'
6969 ],
@@ -98,7 +98,7 @@ def test_get_dict_repr_non_sdk(self):
9898 dict_repr ,
9999 [
100100 '{"direction": "IN", '
101- '"dataType": null, " type": "blob", '
101+ '"type": "blob", '
102102 '"properties": '
103103 '{"SupportsDeferredBinding": false}}'
104104 ],
@@ -138,9 +138,9 @@ def test_get_dict_repr_binding_name_none(self):
138138 self .assertEqual (
139139 dict_repr ,
140140 [
141- '{"direction": "IN", "dataType": null, " type": "blob", '
141+ '{"direction": "IN", "type": "blob", '
142142 '"properties": {"SupportsDeferredBinding": false}}' ,
143- '{"direction": "OUT", "dataType": null, " type": "httpResponse", '
143+ '{"direction": "OUT", "type": "httpResponse", '
144144 '"properties": {"SupportsDeferredBinding": false}}' ,
145145 ],
146146 )
@@ -175,8 +175,46 @@ def test_get_dict_repr_init_params(self):
175175 self .assertEqual (
176176 dict_repr ,
177177 [
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": '
180218 '{"SupportsDeferredBinding": true}}'
181219 ],
182220 )
0 commit comments