summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/tasks/test_immediate_backend.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/tasks/test_immediate_backend.py b/tests/tasks/test_immediate_backend.py
index 356e9ab264..36b63faff8 100644
--- a/tests/tasks/test_immediate_backend.py
+++ b/tests/tasks/test_immediate_backend.py
@@ -228,6 +228,15 @@ class ImmediateBackendTestCase(SimpleTestCase):
self.assertIn("state=FAILED", captured_logs.output[2])
self.assertIn(result.id, captured_logs.output[2])
+ def test_successful_task_no_none_in_logs(self):
+ with self.assertLogs("django.tasks", level="DEBUG") as captured_logs:
+ result = test_tasks.noop_task.enqueue()
+
+ self.assertEqual(result.status, TaskResultStatus.SUCCESSFUL)
+
+ for log_output in captured_logs.output:
+ self.assertNotIn("None", log_output)
+
def test_takes_context(self):
result = test_tasks.get_task_id.enqueue()