Opened 14 years ago

Closed 14 years ago

#2612 defect closed fixed (fixed)

Deferreds not returned in web2 test_wsgi

Reported by: karlb Owned by:
Priority: highest Milestone:
Component: web2 Keywords:
Cc: karlb, therve, Jean-Paul Calderone, Ralph Meijer Branch:
Author:

Description

In twisted/web2/test/test_wsgi.py the deffereds are not properly returned, which let's these tests pass even when they misbehave. The attached patch solves the problem.

Attachments (1)

wsgi_test_missing_return.diff (2.2 KB) - added by karlb 14 years ago.

Download all attachments as: .zip

Change History (14)

Changed 14 years ago by karlb

comment:1 Changed 14 years ago by karlb

Cc: karlb added

comment:2 Changed 14 years ago by therve

Owner: changed from jknight to therve

comment:3 Changed 14 years ago by therve

(In [20382]) Return deferred from tests, cleanups.

Refs #2612

comment:4 Changed 14 years ago by therve

Cc: therve added
Keywords: review added
Owner: changed from therve to jknight

Ready to review in test-wsgi-deferred-2612.

comment:5 Changed 14 years ago by therve

Priority: normalhighest

comment:6 Changed 14 years ago by Jean-Paul Calderone

Cc: Jean-Paul Calderone added
Keywords: review removed
Owner: changed from jknight to therve

I don't think twisted/web2/test/test_wsgi.py existed in 2001, so the copyright statement probably isn't exactly true.

TestContainer has no docstring

Is the class attribute wait_timeout on TestContainer used anywhere? doesn't seem to be

The docstrings that just say "SERVER_PORT" etc are terrible :( if you can figure out what these tests are supposed to be testing, improving them would be great. otherwise don't worry about it.

Fixes to the code look great.

comment:7 Changed 14 years ago by karlb

The tests check whether the CGI/WSGI environment variables (e.g. SERVER_PORT) are set correctly. Maybe a link to the corresponding part of the WSGI spec should be added?

comment:8 Changed 14 years ago by therve

Keywords: review added
Owner: therve deleted

I think exarkun was only talking about the docstrings, not the content of the tests. That should be better now.

comment:9 Changed 14 years ago by jknight

+1.

comment:10 Changed 14 years ago by therve

Is this a review ? :)

comment:11 Changed 14 years ago by Ralph Meijer

Cc: Ralph Meijer added
Keywords: review removed
Owner: set to therve

I'll make it one. Changes look fine to me. Please merge.

comment:12 Changed 14 years ago by therve

Resolution: fixed
Status: newclosed

(In [20484]) Merge test-wsgi-deferred-2612

Authors: karlb, therve Reviewers: ralphm, exarkun Fixes #2612

Modify test_wsgi from web2 so that every tests generating Deferreds return them.

comment:13 Changed 11 years ago by <automation>

Owner: therve deleted
Note: See TracTickets for help on using tickets.