pumazi/wsgi_intercept2 — Issue #2: 2 - empty generator (WSGI app) is not detected properly 
Author: pumazi
Created: 2011-12-22 19:24:59+00:00
State: open

I'm not sure exactly how this problem was encountered but the details are here:
http://www.kds.com.ua/wp/2007/06/04/testing-django-with-twill-and-nosetests/

[snip]
...Now have a pleasure of not starting django development webserver, nor
using apache to do http-level tests in my project.

Thanks to twill and its wsgi integration.

Works smoothly now, but caused me little cursing when twill refused to see
rss feed.

After digging the twill code I’ve changed a single line - still don’t know
how correct is this:

---
/usr/lib/python2.4/site-packages/twill-0.9b1-py2.4.egg/twill/wsgi_intercept.py.orig
2007-06-04 21:10:37 +0300
+++
/usr/lib/python2.4/site-packages/twill-0.9b1-py2.4.egg/twill/wsgi_intercept.py
2007-06-04 21:10:45 +0300
@@ -265,7 +265,7 @@
for data in self.write_results:
self.output.write(data)

- if generator_data:
+ if generator_data is not None:
self.output.write(generator_data)
for data in self.result:
self.output.write(data)

Nevertheless it didn’t break anything and I have a luxury to test rss feeds
too:
...
[snip]

This was committed as revision 3 here but wanted to make this ticket for
safe keeping. Unfortunately, I couldn't come up with a regression test for
the fix since I don't really understand the problem that well.

Original link: http://code.google.com/p/wsgi-intercept/issues/detail?id=2