Skip to content

Commit adbc388

Browse files
committed
Enabling implicit output for generic bindings
1 parent 5909387 commit adbc388

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

azure_functions_worker/bindings/generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ def decode(cls, data: datumdef.Datum, *, trigger_metadata) -> typing.Any:
5252

5353
@classmethod
5454
def has_implicit_output(cls) -> bool:
55-
return False
55+
return True

tests/unittests/test_mock_generic_functions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ async def test_mock_generic_should_not_support_implicit_output(self):
131131
protos.StatusResult.Success)
132132

133133
_, r = await host.invoke_function(
134-
'foobar_as_bytes_no_anno', [
134+
'foobar_implicit_output', [
135135
protos.ParameterBinding(
136136
name='input',
137137
data=protos.TypedData(
@@ -143,7 +143,7 @@ async def test_mock_generic_should_not_support_implicit_output(self):
143143
# It should fail here, since generic binding requires
144144
# $return statement in function.json to pass output
145145
self.assertEqual(r.response.result.status,
146-
protos.StatusResult.Failure)
146+
protos.StatusResult.Success)
147147

148148
async def test_mock_generic_should_support_without_datatype(self):
149149
async with testutils.start_mockhost(
@@ -169,4 +169,4 @@ async def test_mock_generic_should_support_without_datatype(self):
169169
# It should fail here, since the generic binding requires datatype
170170
# to be defined in function.json
171171
self.assertEqual(r.response.result.status,
172-
protos.StatusResult.Failure)
172+
protos.StatusResult.Success)

0 commit comments

Comments
 (0)