コード例 #1
0
    def test_long_enough(self):
        comment = comments.get_model().objects.create(
            comment='My Comment', user=self.author, is_public=True,
            content_object=self.entry, site=self.site)
        self.assertEquals(backend(comment, self.entry, {}), True)

        comment.comment = 'Hello I just wanted to thank for great article'
        comment.save()
        self.assertEquals(backend(comment, self.entry, {}), False)
コード例 #2
0
ファイル: long_enough.py プロジェクト: jmpmcmanus/danugroup
    def test_long_enough(self):
        comment = comments.get_model().objects.create(
            comment="My Comment",
            user=self.author,
            is_public=True,
            content_object=self.entry,
            site=self.site,
            submit_date=timezone.now(),
        )
        self.assertEquals(backend(comment, self.entry, {}), True)

        comment.comment = "Hello I just wanted to thank for great article"
        comment.save()
        self.assertEquals(backend(comment, self.entry, {}), False)