Beispiel #1
0
 def handle_label(self, label, **options):
     return getattr(self, 'handle_' + label)(
         segments=get_segments(),
         usernames=options.get('usernames'),
         start_date=options.get('start'),
         end_date=options.get('end'),
         **options
     )
 def handle_label(self, label, **options):
     return getattr(self, "handle_" + label)(
         segments=get_segments(),
         usernames=options.get("usernames"),
         start_date=options.get("start"),
         end_date=options.get("end"),
         **options
     )
Beispiel #3
0
 def test_get_segments(self):
     segment_name = '%s.%s' % (self.__module__, NewUserSegment.__name__)
     with patch(settings, 'LEAN_SEGMENTS', [segment_name]):
         self.assertEqual(settings.LEAN_SEGMENTS, [segment_name])
         self.assertEqual(get_segments(), [NewUserSegment])
 def test_get_segments(self):
     segment_name = '%s.%s' % (self.__module__, NewUserSegment.__name__)
     with patch(settings, 'LEAN_SEGMENTS', [segment_name]):
         self.assertEqual(settings.LEAN_SEGMENTS, [segment_name])
         self.assertEqual(get_segments(), [NewUserSegment])