def testDetectHandlerMultiple(self): self.flags_dict[labels.ENGINE_FLAG] = 'auto' with self.assertRaises(SystemExit) as cm: handler_factory.detect_handler(self.flags_dict) self.assertEqual( str(cm.exception), 'Multiple orchestrators found. Choose one using --engine flag.')
def test_detect_handler_missing(self): self.flags_dict[labels.ENGINE_FLAG] = 'auto' with self.assertRaises(SystemExit) as cm: handler_factory.detect_handler(self.flags_dict) self.assertEqual( str(cm.exception), 'Orchestrator missing in the environment.' )
def testDetectHandlerMissing(self): self.flags_dict[labels.ENGINE_FLAG] = 'auto' self.assertIsInstance(handler_factory.detect_handler(self.flags_dict), beam_handler.BeamHandler)
def testDetectHandlerMissing(self): self.flags_dict[labels.ENGINE_FLAG] = 'auto' self.assertIs(type(handler_factory.detect_handler(self.flags_dict)), local_handler.LocalHandler)
def test_detect_handler_airflow(self): self.flags_dict[labels.ENGINE_FLAG] = 'auto' self.assertIsInstance(handler_factory.detect_handler(self.flags_dict), airflow_handler.AirflowHandler)