Django

Code

Ticket #8636 (closed: fixed)

Opened 3 months ago

Last modified 3 months ago

Test runner sets SERVER_PORT to int

Reported by: adamlofts Assigned to: nobody
Milestone: Component: Uncategorized
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation:
Needs tests: Patch needs improvement:

Description

The main django wsgi handler sets e.g. SERVER_PORT = '80' but the test runner always sers SERVER_PORT = 80.

Suggested patch:

Index: django/test/client.py =================================================================== --- django/test/client.py (revision 8649) +++ django/test/client.py (working copy) @@ -191,7 +191,7 @@

'REQUEST_METHOD': 'GET', 'SCRIPT_NAME': , 'SERVER_NAME': 'testserver',

- 'SERVER_PORT': 80, + 'SERVER_PORT': '80',

'SERVER_PROTOCOL': 'HTTP/1.1',

} environ.update(self.defaults)

Attachments

client.py.patch (507 bytes) - added by adamlofts on 08/28/08 06:31:02.
Attached as patch to help formatting

Change History

08/28/08 06:31:02 changed by adamlofts

  • attachment client.py.patch added.

Attached as patch to help formatting

08/28/08 06:52:52 changed by russellm

  • status changed from new to closed.
  • resolution set to fixed.

(In [8655]) Fixed #8636: Corrected the test client to use the string '80' in the request META, rather than the integer 80. Thanks to Adam Lofts for the report and fix.


Add/Change #8636 (Test runner sets SERVER_PORT to int)




Change Properties
Action