Example #1
0
 def test_topic_post_moderate_handler(self):
     """
     Create comment that tells what moderation action was made
     """
     topic_post_moderate.send(sender=None,
                              user=self.user,
                              topic=self.topic,
                              action=1)
     self.assertEqual(
         Comment.objects.filter(user=self.user, topic=self.topic,
                                action=1).count(), 1)
Example #2
0
 def send_signal(self, user, action):
     topic_post_moderate.send(sender=self.topic.__class__,
                              user=user,
                              topic=self.topic,
                              action=action)
Example #3
0
 def test_topic_post_moderate_handler(self):
     """
     Create comment that tells what moderation action was made
     """
     topic_post_moderate.send(sender=None, user=self.user, topic=self.topic, action=1)
     self.assertEqual(Comment.objects.filter(user=self.user, topic=self.topic, action=1).count(), 1)
Example #4
0
 def send_signal(self, user, action):
     topic_post_moderate.send(sender=self.topic.__class__, user=user,
                              topic=self.topic, action=action)