MCPcopy Create free account
hub / github.com/celery/celery / test_stackprotection

Method test_stackprotection

t/unit/tasks/test_trace.py:1497–1509  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1495
1496class test_stackprotection:
1497 def test_stackprotection(self):
1498 setup_worker_optimizations(self.app)
1499 try:
1500
1501 @self.app.task(shared=False, bind=True)
1502 def foo(self, i):
1503 if i:
1504 return foo(0)
1505 return self.request
1506
1507 assert foo(1).called_directly
1508 finally:
1509 reset_worker_optimizations(self.app)
1510
1511 def test_stackprotection_headers_passed_on_new_request_stack(self):
1512 setup_worker_optimizations(self.app)

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected