def test_getDiscoInfoException(self):
        def cb(info):
            self.assertEquals([], info)
            self.assertEqual(1, len(self.flushLoggedErrors(NotImplementedError)))

        def getInfo(requestor, target, nodeIdentifier):
            return defer.fail(NotImplementedError())

        self.resource.getInfo = getInfo
        d = self.service.getDiscoInfo(JID('user@example.org/home'),
                                      JID('pubsub.example.org'), 'test')
        d.addCallback(cb)
        return d
If getInfo returns invalid response, it should be logged, then ignored.
dataset/ETHPy150Open ralphm/wokkel/wokkel/test/test_pubsub.py/PubSubServiceTest.test_getDiscoInfoException