def test_resolve_script_path(self, exists_mock):
     config = AmbariConfig().getConfig()
     orchestrator = CustomServiceOrchestrator(config)
     # Testing existing path
     exists_mock.return_value = True
     path = orchestrator.\
       resolve_script_path("/HBASE", "scripts/hbase_master.py", "PYTHON")
     self.assertEqual("/HBASE/package/scripts/hbase_master.py", path)
     # Testing not existing path
     exists_mock.return_value = False
     try:
         orchestrator.resolve_script_path("/HBASE",
                                          "scripts/hbase_master.py",
                                          "PYTHON")
         self.fail('ExpectedException not thrown')
     except AgentException:
         pass  # Expected
 def test_resolve_script_path(self, FileCache_mock, exists_mock):
   FileCache_mock.return_value = None
   dummy_controller = MagicMock()
   config = AmbariConfig().getConfig()
   orchestrator = CustomServiceOrchestrator(config, dummy_controller)
   # Testing existing path
   exists_mock.return_value = True
   path = orchestrator.\
     resolve_script_path("/HBASE/package", "scripts/hbase_master.py", "PYTHON")
   self.assertEqual("/HBASE/package/scripts/hbase_master.py", path)
   # Testing not existing path
   exists_mock.return_value = False
   try:
     orchestrator.resolve_script_path("/HBASE",
                                      "scripts/hbase_master.py", "PYTHON")
     self.fail('ExpectedException not thrown')
   except AgentException:
     pass # Expected
 def test_resolve_script_path(self, FileCache_mock, exists_mock):
   FileCache_mock.return_value = None
   dummy_controller = MagicMock()
   config = AmbariConfig().getConfig()
   orchestrator = CustomServiceOrchestrator(config, dummy_controller)
   # Testing existing path
   exists_mock.return_value = True
   path = orchestrator.\
     resolve_script_path(os.path.join("HBASE", "package"), os.path.join("scripts", "hbase_master.py"))
   self.assertEqual(os.path.join("HBASE", "package", "scripts", "hbase_master.py"), path)
   # Testing not existing path
   exists_mock.return_value = False
   try:
     orchestrator.resolve_script_path("/HBASE",
                                      os.path.join("scripts", "hbase_master.py"))
     self.fail('ExpectedException not thrown')
   except AgentException:
     pass # Expected