DurableClient Converter (#206)
* sample durableClient converter * dc converter & test * lint * removed unnecessary funcs * typo --------- Co-authored-by: Victoria Hall <victoria.hall@microsoft.com>
This commit is contained in:
Родитель
e1d3ebbad3
Коммит
f022bec6d0
|
@ -124,3 +124,12 @@ class ActivityTriggerConverter(meta.InConverter,
|
|||
@classmethod
|
||||
def has_implicit_output(cls) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
# Durable Functions Durable Client Bindings
|
||||
class DurableClientConverter(meta.InConverter,
|
||||
meta.OutConverter,
|
||||
binding='durableClient'):
|
||||
@classmethod
|
||||
def has_implicit_output(cls) -> bool:
|
||||
return False
|
||||
|
|
|
@ -7,7 +7,8 @@ import json
|
|||
from azure.functions.durable_functions import (
|
||||
OrchestrationTriggerConverter,
|
||||
EnitityTriggerConverter,
|
||||
ActivityTriggerConverter
|
||||
ActivityTriggerConverter,
|
||||
DurableClientConverter
|
||||
)
|
||||
from azure.functions._durable_functions import (
|
||||
OrchestrationContext,
|
||||
|
@ -213,6 +214,11 @@ class TestDurableFunctions(unittest.TestCase):
|
|||
ActivityTriggerConverter.has_implicit_output()
|
||||
)
|
||||
|
||||
def test_durable_client_no_implicit_return(self):
|
||||
self.assertFalse(
|
||||
DurableClientConverter.has_implicit_output()
|
||||
)
|
||||
|
||||
def test_enitity_trigger_check_output_type_annotation(self):
|
||||
self.assertTrue(
|
||||
EnitityTriggerConverter.check_output_type_annotation(pytype=None)
|
||||
|
|
Загрузка…
Ссылка в новой задаче