Exemple #1
0
 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.')
Exemple #2
0
 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.'
       )
Exemple #3
0
 def testDetectHandlerMissing(self):
     self.flags_dict[labels.ENGINE_FLAG] = 'auto'
     self.assertIsInstance(handler_factory.detect_handler(self.flags_dict),
                           beam_handler.BeamHandler)
Exemple #4
0
 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)