Exemplo n.º 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.')
Exemplo n.º 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.'
       )
Exemplo n.º 3
0
 def testDetectHandlerMissing(self):
     self.flags_dict[labels.ENGINE_FLAG] = 'auto'
     self.assertIsInstance(handler_factory.detect_handler(self.flags_dict),
                           beam_handler.BeamHandler)
Exemplo n.º 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)
Exemplo n.º 5
0
 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)