Ejemplo n.º 1
0
 def test_consumer_override_api_host(self):
     consumer = mixpanel.Consumer(api_host="api-eu.mixpanel.com")
     with self._assertSends('https://api-eu.mixpanel.com/track', {
             "ip": 0,
             "verbose": 1,
             "data": '{"foo":"bar"}'
     },
                            consumer=consumer):
         consumer.send('events', '{"foo":"bar"}')
     with self._assertSends('https://api-eu.mixpanel.com/engage', {
             "ip": 0,
             "verbose": 1,
             "data": '{"foo":"bar"}'
     },
                            consumer=consumer):
         consumer.send('people', '{"foo":"bar"}')
Ejemplo n.º 2
0
 def setUp(self):
     self.consumer = mixpanel.Consumer()
Ejemplo n.º 3
0
 def setup_class(cls):
     cls.consumer = mixpanel.Consumer(request_timeout=30)
Ejemplo n.º 4
0
 def __init__(self):
     super().__init__(daemon=True)
     self.consumer = mixpanel.Consumer()
Ejemplo n.º 5
0
 def test_consumer_override_api_host(self):
     consumer = mixpanel.Consumer(api_host="api-eu.mixpanel.com")
     with self._assertSends('https://api-eu.mixpanel.com/track', 'ip=0&data=IkV2ZW50Ig%3D%3D&verbose=1', consumer=consumer):
         consumer.send('events', '"Event"')
     with self._assertSends('https://api-eu.mixpanel.com/engage', 'ip=0&data=IlBlb3BsZSI%3D&verbose=1', consumer=consumer):
         consumer.send('people', '"People"')
Ejemplo n.º 6
0
 def setUp(self):
     self.consumer = mixpanel.Consumer(request_timeout=30)
Ejemplo n.º 7
0
 def __init__(self):
     self.consumer = mixpanel.Consumer()