I think if it shows those lines as missing in code coverage, that means that this module was never used or imported. Those lines will show as covered in the report as long as you are successful importing those modules, and no extra tests are needed to validate the ability to import those well tested django modules. As long as you have a single test that tests something in that module, you should be fine. For example:
import traceback
import datetime
# from django.contrib.contenttypes import generic
# from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.conf import settings
def foo(a):
return a + 5
def test_foo():
assert foo(5) == 10
will result in 100% coverage when running under nose with --with-coverage
option for this particular file. I commented out django.contrib
packages because I'm not using django-nose
and do not have proper settings for this example, but it should not matter.