MCPcopy
hub / github.com/celery/celery / test_move

Method test_move

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

Source from the content-addressed store, hash-verified

69 return body, Message(body)
70
71 def test_move(self):
72 with self.move_context() as (callback, pred, republish):
73 pred.return_value = None
74 body, message = self.msgpair()
75 callback(body, message)
76 message.ack.assert_not_called()
77 republish.assert_not_called()
78
79 pred.return_value = 'foo'
80 callback(body, message)
81 message.ack.assert_called_with()
82 republish.assert_called()
83
84 def test_move_transform(self):
85 trans = Mock(name='transform')

Callers

nothing calls this directly

Calls 3

move_contextMethod · 0.95
msgpairMethod · 0.95
callbackFunction · 0.85

Tested by

no test coverage detected