示例#1
0
    def POST_ban(self, form, jquery):
        c.liveupdate_event.banned = True
        c.liveupdate_event.banned_by = c.user.name
        c.liveupdate_event._commit()

        queries.unreport_event(c.liveupdate_event)
        liveupdate_events.ban_event(context=c, request=request)
    def POST_ban(self, form, jquery):
        c.liveupdate_event.banned = True
        c.liveupdate_event.banned_by = c.user.name
        c.liveupdate_event._commit()

        queries.unreport_event(c.liveupdate_event)
        liveupdate_events.ban_event(context=c, request=request)
示例#3
0
 def test_ban(self):
     g.live_config["events_collector_liveupdate_ban_sample_rate"] = 1.0
     self.context.liveupdate_event = self.liveevent
     events.ban_event(
         context=self.context,
         request=self.request
     )
     g.events.queue_production.assert_event_item(
         dict(
             event_topic="live_thread_events",
             event_type="live_thread_ban",
             payload=self.make_payload(),
         )
     )
示例#4
0
    def POST_approve(self, form, jquery):
        c.liveupdate_event.banned = False
        c.liveupdate_event._commit()

        queries.unreport_event(c.liveupdate_event)
        liveupdate_events.ban_event(context=c, request=request)
    def POST_approve(self, form, jquery):
        c.liveupdate_event.banned = False
        c.liveupdate_event._commit()

        queries.unreport_event(c.liveupdate_event)
        liveupdate_events.ban_event(context=c, request=request)