def setup_class(cls):
        cls.hack = test_common.get_monkey_patched_hack()
        cls.app = cls.hack.conn_app.app.test_client()

        # bootstrap, so that each partition holds some events
        logging.info("Bootstraping events...")
        for i in range(TEST_PARTITIONS_NUM * 20):
            event = test_common.create_dummy_event(str(i))
            cls.app.post('/topics/%s/events' % TEST_TOPIC,
                     headers={'Content-type': 'application/json'},
                     data=json.dumps(event))
Exemple #2
0
    def setup_class(cls):
        cls.hack = test_common.get_monkey_patched_hack()
        cls.app = cls.hack.conn_app.app.test_client()

        # bootstrap, so that each partition holds some events
        logging.info("Bootstraping events...")
        for i in range(TEST_PARTITIONS_NUM * 20):
            event = test_common.create_dummy_event(str(i))
            cls.app.post('/topics/%s/events' % TEST_TOPIC,
                         headers={'Content-type': 'application/json'},
                         data=json.dumps(event))
Exemple #3
0
 def setUpClass(cls):
     cls.hack = test_common.get_monkey_patched_hack()
     cls.app = cls.hack.conn_app.app.test_client()
Exemple #4
0
 def setup_class(cls):
     cls.hack = test_common.get_monkey_patched_hack()
     cls.app = cls.hack.conn_app.app.test_client()