def test_compat_worker(self): with patch('celery.__main__.maybe_patch_concurrency') as mpc: with patch('celery.__main__._warn_deprecated') as depr: with patch('celery.bin.worker.main') as main: __main__._compat_worker() mpc.assert_called_with() depr.assert_called_with('celery worker') main.assert_called_with()