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)
def send_signal(self, user, action): topic_post_moderate.send(sender=self.topic.__class__, user=user, topic=self.topic, action=action)
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)