kmike/django-webtest — pull request #7 by carljm (2013-05-23 00:21:54+00:00)
Title: Add compatibility with Django 1.6.

This fixes a few issues with django-webtest and Django 1.6 (i.e. master).

First issue was that ``runtests.py`` was based on an old pre-1.4 ``manage.py`` and used deprecated functions that are now removed in 1.6. I updated this to look like a Django 1.4+ ``manage.py``, plus the ``sys.argv`` manipulations that were there, and it works fine.

Second issue is that the automatic connection-closing works differently in 1.6; the function attached to request signal handlers is now ``close_old_connections`` instead of ``close_connection``, and it is attached to both ``request_finished`` and ``request_started`` signals. I fixed this in a backwards-compatible way.

Third issue is that ``assertRedirects`` in 1.6 uses a ``url`` property on the response, which is a convenience accessor for the Location header. I added this property to ``DjangoWebtestResponse``.

Tox run passes all environments, including the new dj16 one, with these fixes.