Continuing #6 -- there are probably relevant tests in the Django test suite, which haven't been copied in here yet.