def test_handle_properties_given(self): et = EventTracker() properties = et._handle_properties({'token': 'bar'}, None) self.assertEqual('bar', properties['token']) properties = et._handle_properties({'token': 'bar'}, 'foo') self.assertEqual('bar', properties['token'])
def test_handle_properties_empty(self): et = EventTracker() mp_settings.MIXPANEL_API_TOKEN = 'bar' properties = et._handle_properties(None, None) self.assertEqual('bar', properties['token'])
def test_handle_properties_w_token(self): et = EventTracker() properties = et._handle_properties({}, 'foo') self.assertEqual('foo', properties['token'])