Thursday, May 28, 2015

Django Test Coverage

Hello all,

I have a django app which is full REST APIs created using Django Rest Framework.

In tests.py, I am testing fthe APIs using self.client.post and
self.clilent.get. I use coverage tool to figure out the test coverage
but it seems to check the coverage in a way I don't really understand.

When I check test coverage for just views.py file, it says 37% and
when I do that for tests.py, it says 98%.

Is there a way to determine test coverage only by looking at views.py
and checking how many of the views in it are tested in tests.py?

Or is it an unreasonable expectation?

Regards,
Dharmit.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@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/CAJQZradk25770YeOGjHT4tBRaJsrexo578pt7xnHFRKZ0hAWFg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment