コード例 #1
0
 def setUp(self):
     # it is too bad but until we remove usage of AsyncResult in the codebase
     # there is no way to make these tests synchronous
     # thus overriding queue config so these tests
     # use celery in async mode
     queue.conf['CELERY_ALWAYS_EAGER'] = False
     WebTest.setUp(self)
コード例 #2
0
 def setUp(self):
     # it is too bad but until we remove usage of AsyncResult in the codebase
     # there is no way to make these tests synchronous
     # thus overriding queue config so these tests
     # use celery in async mode
     queue.conf['CELERY_ALWAYS_EAGER'] = False
     WebTest.setUp(self)
コード例 #3
0
 def setUp(self):
     WebTest.setUp(self)
     # add reports just for testing
     report_created = PersistentReport(
         user_id=self.owner_user_id,
         status=celery.states.PENDING,
         queue_result_key=None,
         show_in_ui=True
     )
     report_started = PersistentReport(
         user_id=self.owner_user_id,
         status=celery.states.STARTED,
         queue_result_key=None,
         show_in_ui=True
     )
     report_started2 = PersistentReport(
         user_id=self.owner_user_id,
         status=celery.states.STARTED,
         queue_result_key=None,
         show_in_ui=True
     )
     report_finished = PersistentReport(
         user_id=self.owner_user_id,
         status=celery.states.SUCCESS,
         queue_result_key=None,
         show_in_ui=True
     )
     self.session.add_all([
         report_created,
         report_started,
         report_started2,
         report_finished
     ])
     self.session.commit()
コード例 #4
0
 def setUp(self):
     WebTest.setUp(self)
     self.cohort_service = CohortService()
コード例 #5
0
 def setUp(self):
     WebTest.setUp(self)
コード例 #6
0
 def tearDown(self):
     queue.conf['CELERY_ALWAYS_EAGER'] = True
     WebTest.tearDown(self)
コード例 #7
0
 def tearDown(self):
     queue.conf['CELERY_ALWAYS_EAGER'] = True
     WebTest.tearDown(self)
コード例 #8
0
 def setUp(self):
     WebTest.setUp(self)
     self.cohort_service = CohortService()
コード例 #9
0
 def setUp(self):
     WebTest.setUp(self)