

def test_produce_consume_fanout(self):
    producer = self.c.Producer()
    consumer = self.c.Consumer([self.q3, self.q4])
    producer.publish({
        'hello': 'world',
    }, declare=consumer.queues, exchange=self.fanout)
    self.assertEqual(self.q3(self.c).get().payload, {
        'hello': 'world',
    })
    self.assertEqual(self.q4(self.c).get().payload, {
        'hello': 'world',
    })
    self.assertIsNone(self.q3(self.c).get())
    self.assertIsNone(self.q4(self.c).get())

dataset/ETHPy150Open celery/kombu/kombu/tests/transport/test_memory.py test_MemoryTransport.test_produce_consume_fanout/original