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)
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)