Are these tests redundant?

24 views
Skip to first unread message

Tianyi Wang

unread,
Jul 15, 2014, 11:47:51 AM7/15/14
to django...@googlegroups.com
Hi,

I have a very simple model:

class Action(models.Model):
    name = models.CharField('Name', max_length=100)
    deleted = models.BooleanField('Deleted', default=False)

    def __unicode__(self):
        return self.name

    class Meta:
        ordering = ('name',)


Do you think my tests are reasonable or some of them are redundant? 

Thanks

Tianyi

Esau Rodriguez

unread,
Jul 15, 2014, 12:59:04 PM7/15/14
to django-users@googlegroups com

Imho all but 4 are redundant. That is already tested in django itself.

Regards,
Esau Rodriguez.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/dbe37d7f-c9db-48c6-8757-6251689a1141%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tianyi Wang

unread,
Jul 15, 2014, 1:21:49 PM7/15/14
to django...@googlegroups.com
After looking at these tests again, yes, I agree. 
No point of testing model object creation since it's Django's job.
Testing the methods on the Model would be more useful I guess. 

Cheers,

Tianyi
Reply all
Reply to author
Forward
0 new messages