def test_publish_retry_calls_ensure(self): p = Producer(Mock()) p._connection = Mock() p._connection.declared_entities = set() ensure = p.connection.ensure = Mock() p.publish('foo', exchange='foo', retry=True) ensure.assert_called()
def test_publish_retry_calls_ensure(self): p = Producer(Mock()) p._connection = Mock() ensure = p.connection.ensure = Mock() p.publish('foo', exchange='foo', retry=True) self.assertTrue(ensure.called)