How to use the oasislmf.utils.status.STATUS_PENDING function in oasislmf

To help you get started, we’ve selected a few oasislmf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OasisLMF / OasisPlatform / tests / test_analysis.py View on Github external
def test_celery_task_is_pending___result_is_pending(self):
        response = self.app.get('/analysis_status/{}'.format('location'))

        self.assertEqual(json.loads(response.data.decode('utf-8')), {
            'id': -1,
            'status': status.STATUS_PENDING,
            'message': '',
            'outputs_location': None,
        })
github OasisLMF / OasisPlatform / tests / test_analysis.py View on Github external
    @patch('src.server.app.CELERY.AsyncResult', Mock(return_value=fake_result('message', status.STATUS_PENDING)))
    def test_celery_task_is_pending___result_is_pending(self):
        response = self.app.get('/analysis_status/{}'.format('location'))

        self.assertEqual(json.loads(response.data.decode('utf-8')), {
            'id': -1,
            'status': status.STATUS_PENDING,
            'message': '',
            'outputs_location': None,
        })