MCPcopy
hub / github.com/celery/celery / test_move_transform

Method test_move_transform

t/unit/contrib/test_migrate.py:84–94  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

82 republish.assert_called()
83
84 def test_move_transform(self):
85 trans = Mock(name='transform')
86 trans.return_value = Queue('bar')
87 with self.move_context(transform=trans) as (callback, pred, republish):
88 pred.return_value = 'foo'
89 body, message = self.msgpair()
90 with patch('celery.contrib.migrate.maybe_declare') as maybed:
91 callback(body, message)
92 trans.assert_called_with('foo')
93 maybed.assert_called()
94 republish.assert_called()
95
96 def test_limit(self):
97 with self.move_context(limit=1) as (callback, pred, republish):

Callers

nothing calls this directly

Calls 4

move_contextMethod · 0.95
msgpairMethod · 0.95
QueueClass · 0.85
callbackFunction · 0.85

Tested by

no test coverage detected