Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(16)  |  Call(16)  |  Derive(0)  |  Import(0)

src/z/a/zato-HEAD/code/zato-common/test/zato/common/pubsub/test_api_impl.py   zato(Download)
 
        # Without adding consumer key, validation won't succeed.
        self.assertRaises(PubSubException, self.api.impl.validate_sub_key, invalid_sub_key)
        self.assertRaises(PubSubException, self.api.impl.validate_sub_key, valid_sub_key)
 
        # After adding a subscription key no error should be raised.
        self.api.impl.add_consumer(consumer, topic)
        self.api.impl.add_subscription(valid_sub_key, client_id, topic_name)
 
        self.assertRaises(PubSubException, self.api.impl.validate_sub_key, invalid_sub_key)
 
        # After deleting a consumer, validation won't succeed anymore.
        self.assertRaises(PubSubException, self.api.impl.validate_sub_key, invalid_sub_key)
        self.assertRaises(PubSubException, self.api.impl.validate_sub_key, valid_sub_key)