MCPcopy
hub / github.com/celery/celery / test_start__stop

Method test_start__stop

t/unit/worker/test_bootsteps.py:172–190  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

170 self.steps = []
171
172 def test_start__stop(self):
173 x = self.Def(self)
174 x.create = Mock()
175
176 # include creates the underlying object and sets
177 # its x.obj attribute to it, as well as appending
178 # it to the parent.steps list.
179 x.include(self)
180 assert self.steps
181 assert self.steps[0] is x
182
183 x.start(self)
184 x.obj.start.assert_called_with()
185
186 x.stop(self)
187 x.obj.stop.assert_called_with()
188
189 x.obj = None
190 assert x.start(self) is None
191
192 def test_terminate__no_obj(self):
193 x = self.Def(self)

Callers

nothing calls this directly

Calls 3

includeMethod · 0.45
startMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected