praekelt/django-setuptest — pull request #15 by kezabelle (2014-01-30 18:17:00+00:00)
Title: Support for testing against Django 1.7 (trunk)

as of the great App Refactor done in december, there are changes to the way Django and packages are instantiated & setup, specifically:
- Django now has a `setup` method which is (IIRC) where startup related code goes
- apps previously got via `get_app` should instead be requesting the `AppConfig` instance for that package, which carries with it data about where the models module is, etc.

This changeset tries to call `setup` if possible, and switches out the old `get_app` method if it detects it can load the app config instead.

Without these two changes, running tests against `master` results in the follow issues:
- without calling `django.setup`, an exception is raised to say the App Registry is not ready yet.
- without requesting the app config instead of the app, `build_suite` fails as it now tries to access the `models_module` attribute of the provided object (the `app` variable, in setuptest).

The version of master needs to be recent, so that [ticket 21833](https://code.djangoproject.com/ticket/21833) is fixed.