コード例 #1
0
    def test_update_status_vcp(self, mock_co, mock_tup):
        tethysjob = CondorBase(
            name='test_tethysjob',
            description='test_description',
            user=self.user,
            label='test_label',
            scheduler=self.scheduler,
            execute_time=django_timezone.now(),
        )
        mock_tup.return_value = True
        mock_co.status = 'Various-Complete'
        tethysjob.update_status()

        # Check result
        self.assertIsNotNone(tethysjob.last_status_update)
        self.assertIsInstance(tethysjob.last_status_update, datetime)
        self.assertIsNotNone(tethysjob.completion_time)
        self.assertIsInstance(tethysjob.completion_time, datetime)
コード例 #2
0
ファイル: test_TethysJob.py プロジェクト: macweather/tethys
    def test_update_status_run(self, mock_co, mock_tup):
        tethysjob = CondorBase(
            name='test_tethysjob',
            description='test_description',
            user=self.user,
            label='test_label',
            scheduler=self.scheduler,
            execute_time=dt.now(),
        )
        mock_tup.return_value = True
        mock_co.status = 'Running'
        tethysjob.update_status()

        # Check result
        self.assertIsNotNone(tethysjob.last_status_update)
        self.assertIsInstance(tethysjob.last_status_update, datetime)
        self.assertIsNotNone(tethysjob.start_time)
        self.assertIsInstance(tethysjob.start_time, datetime)
コード例 #3
0
    def test_update_status_vcp(self, mock_co, mock_tup):
        tethysjob = CondorBase(
            name='test_tethysjob',
            description='test_description',
            user=self.user,
            label='test_label',
            scheduler=self.scheduler,
            execute_time=django_timezone.now(),
        )
        mock_tup.return_value = True
        mock_co.status = 'Various-Complete'
        tethysjob.update_status()

        # Check result
        self.assertIsNotNone(tethysjob.last_status_update)
        self.assertIsInstance(tethysjob.last_status_update, datetime)
        self.assertIsNotNone(tethysjob.completion_time)
        self.assertIsInstance(tethysjob.completion_time, datetime)
コード例 #4
0
ファイル: test_TethysJob.py プロジェクト: SarvaPulla/tethys
    def test_update_status_run(self, mock_co, mock_tup):
        tethysjob = CondorBase(
            name='test_tethysjob',
            description='test_description',
            user=self.user,
            label='test_label',
            scheduler=self.scheduler,
            execute_time=dt.now(),
        )
        mock_tup.return_value = True
        mock_co.status = 'Running'
        tethysjob.update_status()

        # Check result
        self.assertIsNotNone(tethysjob.last_status_update)
        self.assertIsInstance(tethysjob.last_status_update, datetime)
        self.assertIsNotNone(tethysjob.start_time)
        self.assertIsInstance(tethysjob.start_time, datetime)