More lines for coverage to ignore

These lines are hit by python version or if the test suite is being run
from django. So they are to ensure that things continue to work at weird
configurations that I haven't found how to test on Travis.