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

Method timeout_then_error

t/unit/worker/test_loops.py:101–106  ·  view source on GitHub ↗
(self, mock)

Source from the content-addressed store, hash-verified

99 _consumer.strategies = self.obj.strategies
100
101 def timeout_then_error(self, mock):
102
103 def first(*args, **kwargs):
104 mock.side_effect = socket.error()
105 raise socket.timeout()
106 mock.side_effect = first
107
108 def close_then_error(self, mock=None, mod=0, exc=None):
109 mock = Mock() if mock is None else mock

Calls

no outgoing calls

Tested by

no test coverage detected