feat: add digest-gated internal main deployment
This commit is contained in:
@@ -111,6 +111,21 @@ class CeleryModuleTest(SimpleTestCase):
|
||||
|
||||
apply_async_mock.assert_not_called()
|
||||
|
||||
def test_startup_refresh_skips_when_disabled(self):
|
||||
with patch.dict(
|
||||
os.environ, {"DJANGO_SETTINGS_MODULE": "settings.test"}, clear=True
|
||||
), patch.object(sys, "argv", ["python", "manage.py", "shell"]):
|
||||
module = _load_module("isolated_core_celery_startup_disabled")
|
||||
|
||||
with patch.object(
|
||||
module,
|
||||
"settings",
|
||||
SimpleNamespace(CELERY_STARTUP_REFRESH_ENABLED=False),
|
||||
), patch.object(module.cache, "add") as add_mock:
|
||||
module._queue_startup_sources_refresh()
|
||||
|
||||
add_mock.assert_not_called()
|
||||
|
||||
def test_debug_task_prints_request(self):
|
||||
with patch.dict(
|
||||
os.environ, {"DJANGO_SETTINGS_MODULE": "settings.test"}, clear=True
|
||||
|
||||
Reference in New Issue
Block a user