@@ -144,6 +144,8 @@ async def test_mock_generic_should_support_implicit_output(self):
144144 # implicitly
145145 self .assertEqual (r .response .result .status ,
146146 protos .StatusResult .Success )
147+ self .assertEqual (r .response .return_value ,
148+ protos .TypedData (bytes = b'\x00 \x01 ' ))
147149
148150 async def test_mock_generic_should_support_without_datatype (self ):
149151 async with testutils .start_mockhost (
@@ -195,3 +197,28 @@ async def test_mock_generic_implicit_output_exemption(self):
195197 # For the Durable Functions durableClient case
196198 self .assertEqual (r .response .result .status ,
197199 protos .StatusResult .Failure )
200+
201+ async def test_mock_generic_as_nil_data (self ):
202+ async with testutils .start_mockhost (
203+ script_root = self .generic_funcs_dir ) as host :
204+
205+ await host .init_worker ("4.17.1" )
206+ func_id , r = await host .load_function ('foobar_nil_data' )
207+
208+ self .assertEqual (r .response .function_id , func_id )
209+ self .assertEqual (r .response .result .status ,
210+ protos .StatusResult .Success )
211+
212+ _ , r = await host .invoke_function (
213+ 'foobar_nil_data' , [
214+ protos .ParameterBinding (
215+ name = 'input' ,
216+ data = protos .TypedData ()
217+ )
218+ ]
219+ )
220+ self .assertEqual (r .response .result .status ,
221+ protos .StatusResult .Success )
222+ self .assertEqual (
223+ r .response .return_value ,
224+ protos .TypedData ())
0 commit comments