Beispiel #1
0
  def setUp( self ):

    self.mockTransClient = Mock()
    self.mockTransClient.setTaskStatusAndWmsID.return_value = {'OK':True}

    self.WMSClientMock = Mock()
    self.jobMonitoringClient = Mock()
    self.mockReqClient = Mock()

    self.jobMock = Mock()
    self.jobMock2 = Mock()
    mockWF = Mock()
    mockPar = Mock()
    mockWF.findParameter.return_value = mockPar
    mockPar.getValue.return_value = 'MySite'

    self.jobMock2.workflow = mockWF
    self.jobMock2.setDestination.return_value = {'OK':True}
    self.jobMock.workflow.return_value = ''
    self.jobMock.return_value = self.jobMock2

    self.taskBase = TaskBase( transClient = self.mockTransClient )
    self.wfTasks = WorkflowTasks( transClient = self.mockTransClient,
                                  submissionClient = self.WMSClientMock,
                                  jobMonitoringClient = self.jobMonitoringClient,
                                  outputDataModule = "mock",
                                  jobClass = self.jobMock )
    self.requestTasks = RequestTasks( transClient = self.mockTransClient,
                                      requestClient = self.mockReqClient
                                      )
    self.tc = TransformationClient()
    self.transformation = Transformation()

    self.maxDiff = None
Beispiel #2
0
  def setUp(self):
    self.mockTransClient = mock.MagicMock()
    self.mockTransClient.setTaskStatusAndWmsID.return_value = {'OK': True}

    self.mockReqClient = mock.MagicMock()

    self.taskBase = TaskBase(transClient=self.mockTransClient)
    self.pu = PluginUtilities(transClient=self.mockTransClient)

    self.requestTasks = RequestTasks(transClient=self.mockTransClient,
                                     requestClient=self.mockReqClient,
                                     requestValidator=reqValFake)
    self.transformation = Transformation()

    self.maxDiff = None
    def setUp(self):

        self.mockTransClient = MagicMock()
        self.mockTransClient.setTaskStatusAndWmsID.return_value = {'OK': True}

        self.WMSClientMock = MagicMock()
        self.jobMonitoringClient = MagicMock()
        self.mockReqClient = MagicMock()

        self.jobMock = MagicMock()
        self.jobMock2 = MagicMock()
        mockWF = MagicMock()
        mockPar = MagicMock()
        mockWF.findParameter.return_value = mockPar
        mockPar.getValue.return_value = 'MySite'

        self.jobMock2.workflow = mockWF
        self.jobMock2.setDestination.return_value = {'OK': True}
        self.jobMock.workflow.return_value = ''
        self.jobMock.return_value = self.jobMock2

        self.reqValidatorMock = MagicMock()
        self.reqValidatorMock.validate.return_value = {'OK': True}

        self.taskBase = TaskBase(transClient=self.mockTransClient)
        self.pu = PluginUtilities(transClient=self.mockTransClient)
        self.wfTasks = WorkflowTasks(
            transClient=self.mockTransClient,
            submissionClient=self.WMSClientMock,
            jobMonitoringClient=self.jobMonitoringClient,
            outputDataModule="mock")

        self.requestTasks = RequestTasks(transClient=self.mockTransClient,
                                         requestClient=self.mockReqClient,
                                         requestValidator=reqValFake)
        self.tc = TransformationClient()
        self.transformation = Transformation()

        self.maxDiff = None

        gLogger.setLevel('DEBUG')
Beispiel #4
0
    def setUp(self):

        self.mockTransClient = Mock()
        self.mockTransClient.setTaskStatusAndWmsID.return_value = {'OK': True}

        self.WMSClientMock = Mock()
        self.jobMonitoringClient = Mock()
        self.mockRequestClient = Mock()

        self.jobMock = Mock()
        self.jobMock.setDestination.return_value = {'OK': True}

        self.taskBase = TaskBase(transClient=self.mockTransClient)
        self.wfTasks = WorkflowTasks(
            transClient=self.mockTransClient,
            submissionClient=self.WMSClientMock,
            jobMonitoringClient=self.jobMonitoringClient,
            outputDataModule="mock",
            jobClass=self.jobMock)
        self.requestTasks = RequestTasks(transClient=self.mockTransClient,
                                         requestClient=self.mockRequestClient)