def _do_test(current_process): from celery.apps.worker import get_process_name self.assertTrue(get_process_name())
def test_process_name_wo_mp(self): with mask_modules("multiprocessing"): with reset_modules("celery.apps.worker"): from celery.apps.worker import get_process_name self.assertIsNone(get_process_name())