Example #1
0
    def test_create_post_notification_user_is_same(self):
        post = Post(content='as;ldkfja;')
        post.save()
        response = create_notification_util(post.object_uuid, self.pleb,
                                            [self.pleb], str(uuid1()),
                                            self.url, post.action_name)

        self.assertTrue(response)
Example #2
0
    def test_create_post_notification_already_exists_not_sent(self):
        notification = Notification().save()
        post = Post(object_uuid=uuid1(), content='as;ldkfja;')
        post.save()
        response = create_notification_util(post.object_uuid, self.pleb,
                                            [self.pleb2],
                                            notification.object_uuid, self.url,
                                            post.action_name)

        self.assertTrue(response)
Example #3
0
    def test_create_comment_notification_pleb_is_the_same(self):
        post = Post(content='as;ldkfja;')
        post.save()
        comment = Comment(content='sdfasd')
        comment.save()

        response = create_notification_util(comment.object_uuid, self.pleb,
                                            [self.pleb], str(uuid1()),
                                            self.url, post.action_name)

        self.assertTrue(response)
Example #4
0
 def test_create_comment_notification_already_exists_not_sent(self):
     comment = Comment(content='sdfasd')
     comment.save()
     notification = Notification().save()
     post = Post(content='as;ldkfja;')
     post.save()
     response = create_notification_util(comment.object_uuid, self.pleb,
                                         [self.pleb2],
                                         notification.object_uuid, self.url,
                                         post.action_name)
     self.assertTrue(response)