Пример #1
0
 def test_orchestration_trigger_converter_type(self):
     datum = Datum(value='{ "name": "great function" }'.encode('utf-8'),
                   type=bytes)
     otc = OrchestrationTriggerConverter.decode(datum,
                                                trigger_metadata=None)
     content = json.loads(otc.body)
     self.assertEqual(content.get('name'), 'great function')
Пример #2
0
 def test_orchestration_trigger_has_implicit_return(self):
     self.assertTrue(OrchestrationTriggerConverter.has_implicit_output())
Пример #3
0
 def test_orchestration_trigger_check_bad_annotation(self):
     for dt in (str, bytes, int):
         self.assertFalse(
             OrchestrationTriggerConverter.check_input_type_annotation(dt))
Пример #4
0
 def test_orchestration_trigger_check_good_annotation(self):
     for dt in (OrchestrationContext, ):
         self.assertTrue(
             OrchestrationTriggerConverter.check_input_type_annotation(dt))