David Winterbottom avatar David Winterbottom committed 7471d02

Add support for Django 1.5's streaming response

Well, by "add support" I mean provide a 'streaming' attribute to the
response class that allows Django's testrunner to not choke when
processing the response. Without this, you get an AttributeError from here:

I think the right fix is in django-webtest rather than in Django itself.

The commit ID in tox.ini for Django 1.5 was 4 months out of date. When
I bumped it to today's latest commit, the tests started failing (hence I
didn't need to write a new failing test).

Comments (0)

Files changed (2)


 from django.test import Client
 from django.http import SimpleCookie
 class DjangoWebtestResponse(TestResponse):
     WebOb's Response quacking more like django's HttpResponse.
     This is here to make more django's TestCase asserts work,
     not to provide a generally useful proxy.
+    streaming = False
     def status_code(self):
         return self.status_int
-    git+https://github.com/django/django.git@fbd4b3a5188d0b488648f1fdd2339e1eac6722a2#egg=django
+    git+https://github.com/django/django.git@64f1a175bd8228493ef600a62cd2f331a17787e6#egg=django
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.