def test_setup_concurrency_very_early(self): x = WorkerCommand() x.run = Mock() with self.assertRaises(ImportError): x.execute_from_commandline(['worker', '-P', 'xyzybox'])
def test_invalid_loglevel_gives_error(self): x = WorkerCommand(app=Celery(set_as_current=False)) with self.assertRaises(SystemExit): x.run(loglevel='GRIM_REAPER')