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

Method test_get_prefix

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

Source from the content-addressed store, hash-verified

8class test_StepFormatter:
9
10 def test_get_prefix(self):
11 f = bootsteps.StepFormatter()
12 s = Mock()
13 s.last = True
14 assert f._get_prefix(s) == f.blueprint_prefix
15
16 s2 = Mock()
17 s2.last = False
18 s2.conditional = True
19 assert f._get_prefix(s2) == f.conditional_prefix
20
21 s3 = Mock()
22 s3.last = s3.conditional = False
23 assert f._get_prefix(s3) == ''
24
25 def test_node(self):
26 f = bootsteps.StepFormatter()

Callers

nothing calls this directly

Calls 1

_get_prefixMethod · 0.95

Tested by

no test coverage detected