示例#1
0
 def configure(self):
     self.ctx.super.return_value = self.superclass = MagicMock()
     self.publisher = BlockingJSONPublisher(sentinel.broker)
     self.publisher._serialize = MagicMock(return_value=sentinel.body)
     self.publisher._channel = MagicMock(is_open=True)
     self.properties = MagicMock(content_type=None)
示例#2
0
 def execute(self):
     BlockingJSONPublisher(self.broker).publish(self.exchange,
                                                self.routing_key,
                                                self.payload)
示例#3
0
 def should_extend_BlockingPublisher(self):
     isinstance(BlockingJSONPublisher(sentinel.broker), BlockingPublisher)