Exemple #1
0
    def test_tagging( self ):
        """
            test posts tagging
        """

        post = Post()
        post.title = "Lorem ipsum"
        post.permalink = "lorem-ipsum"
        post.body = "siala lala tralala"
        post.user = self.u1
        post.status = Object.PUBLIC_STATUS
        post.type = Object.TYPE_POST
        post.tag_list = 'ww2,pl,lorem'
        post.save()

        self.assertEqual( UserActivity.objects.all_notes().tagged( 'ww2' ).count(), 1 )
Exemple #2
0
    def test_tagging(self):
        """
            test posts tagging
        """

        post = Post()
        post.title = "Lorem ipsum"
        post.permalink = "lorem-ipsum"
        post.body = "siala lala tralala"
        post.user = self.u1
        post.status = Object.PUBLIC_STATUS
        post.type = Object.TYPE_POST
        post.tag_list = 'ww2,pl,lorem'
        post.save()

        self.assertEqual(
            UserActivity.objects.all_notes().tagged('ww2').count(), 1)