def test_notifyPublishCollection(self):
        subscriber = JID('user@example.org')
        subscriptions = [pubsub.Subscription('', subscriber, 'subscribed')]
        items = [pubsub.Item('current')]
        notifications = [(subscriber, subscriptions, items)]
        self.service.notifyPublish(JID('pubsub.example.org'), 'test',
                                   notifications)
        message = self.stub.output[-1]

        self.assertTrue(message.event.items.hasAttribute('node'))
        self.assertEquals('test', message.event.items['node'])
        headers = shim.extractHeaders(message)
        self.assertIn('Collection', headers)
        self.assertIn('', headers['Collection'])
Publish notifications are sent to the subscribers of collections.
dataset/ETHPy150Open ralphm/wokkel/wokkel/test/test_pubsub.py/PubSubServiceTest.test_notifyPublishCollection