@@ -42,9 +42,9 @@ def test_track(self):
4242 }
4343 }
4444 )])
45-
45+
4646 def test_track_meta (self ):
47- self .mp .track ('ID' , 'button press' , {'size' : 'big' , 'color' : 'blue' },
47+ self .mp .track ('ID' , 'button press' , {'size' : 'big' , 'color' : 'blue' },
4848 meta = {'$ip' : 0 , '$ignore_time' : True ,})
4949 self .assertEqual (self .consumer .log , [(
5050 'events' , {
@@ -174,9 +174,9 @@ def test_alias(self):
174174 }
175175
176176 )])
177-
177+
178178 def test_people_meta (self ):
179- self .mp .people_set ('amq' , {'birth month' : 'october' , 'favorite color' : 'purple' },
179+ self .mp .people_set ('amq' , {'birth month' : 'october' , 'favorite color' : 'purple' },
180180 meta = {'$ip' : 0 , '$ignore_time' : True })
181181 self .assertEqual (self .consumer .log , [(
182182 'people' , {
@@ -209,11 +209,11 @@ def _assertSends(self, expect_url, expect_data):
209209 self .assertEqual (request .get_data (), expect_data )
210210
211211 def test_send_events (self ):
212- with self ._assertSends ('https://api.mixpanel.com/track' , 'data=IkV2ZW50Ig%3D%3D&verbose=1' ):
212+ with self ._assertSends ('https://api.mixpanel.com/track' , 'ip=0& data=IkV2ZW50Ig%3D%3D&verbose=1' ):
213213 self .consumer .send ('events' , '"Event"' )
214214
215215 def test_send_people (self ):
216- with self ._assertSends ('https://api.mixpanel.com/engage' ,'data=IlBlb3BsZSI%3D&verbose=1' ):
216+ with self ._assertSends ('https://api.mixpanel.com/engage' ,'ip=0& data=IlBlb3BsZSI%3D&verbose=1' ):
217217 self .consumer .send ('people' , '"People"' )
218218
219219class BufferedConsumerTestCase (unittest .TestCase ):
@@ -232,7 +232,7 @@ def test_buffer_hold_and_flush(self):
232232 self .assertEqual (urlopen .call_count , 1 )
233233 ((request ,),_ ) = urlopen .call_args
234234 self .assertEqual (request .get_full_url (), 'https://api.mixpanel.com/track' )
235- self .assertEqual (request .get_data (), 'data=WyJFdmVudCJd&verbose=1' )
235+ self .assertEqual (request .get_data (), 'ip=0& data=WyJFdmVudCJd&verbose=1' )
236236
237237 def test_buffer_fills_up (self ):
238238 with patch ('urllib2.urlopen' , return_value = self .mock ) as urlopen :
@@ -245,7 +245,7 @@ def test_buffer_fills_up(self):
245245 self .assertEqual (urlopen .call_count , 1 )
246246 ((request ,),_ ) = urlopen .call_args
247247 self .assertEqual (request .get_full_url (), 'https://api.mixpanel.com/track' )
248- self .assertEqual (request .get_data (), 'data=WyJFdmVudCIsIkV2ZW50IiwiRXZlbnQiLCJFdmVudCIsIkV2ZW50IiwiRXZlbnQiLCJFdmVudCIsIkV2ZW50IiwiRXZlbnQiLCJMYXN0IEV2ZW50Il0%3D&verbose=1' )
248+ self .assertEqual (request .get_data (), 'ip=0& data=WyJFdmVudCIsIkV2ZW50IiwiRXZlbnQiLCJFdmVudCIsIkV2ZW50IiwiRXZlbnQiLCJFdmVudCIsIkV2ZW50IiwiRXZlbnQiLCJMYXN0IEV2ZW50Il0%3D&verbose=1' )
249249
250250class FunctionalTestCase (unittest .TestCase ):
251251 def setUp (self ):
0 commit comments