Fix up the base Djblets testing support for Django 1.8.

Review Request #7418 — Created June 12, 2015 and submitted

Information

Djblets
release-0.9.x
c37508c...

Reviewers

This gets the test harness in shape to test against Django 1.8. The test
runner has some additional setup it's now responsible for, and there's
middleware we don't need that doesn't exist in Django these days.

That's the easy part.

The mixin for loading test-specific models needed to be updated to work
with the new app/model registries in Django 1.7+. These are a much nicer
API for the sorts of things we had to hack around before, but isn't
really documented for the purposes we're dealing with.

We essentially now have to copy over all the models into a virtual
'models' module (which was already being set up), and then use the new
API for registering the models, pushing a new set of installed apps, and
updating the database using the 'migrate' management command.

The result is that the basic test harness works again, in both Django
1.6 and 1.8. Future changes will fix the individual tests.

Along with the other upcoming changes, all unit tests pass on Django 1.6
and 1.8.

Description From Last Updated

'django' imported but unused

reviewbotreviewbot

'contextlib' imported but unused

reviewbotreviewbot
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/testing/testcases.py
        tests/settings.py
        tests/runtests.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/testing/testcases.py
        tests/settings.py
        tests/runtests.py
    
    
  2. djblets/testing/testcases.py (Diff revision 1)
     
     
    Show all issues
     'django' imported but unused
    
  3. tests/runtests.py (Diff revision 1)
     
     
    Show all issues
     'contextlib' imported but unused
    
  4. 
      
chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/testing/testcases.py
        tests/settings.py
        tests/runtests.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/testing/testcases.py
        tests/settings.py
        tests/runtests.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-0.9.x (75c3af9)