#12227: PREPEND_WWW breaks the test client
-------------------------------------+-------------------------------------
Reporter: andybak | Owner: Sharpek
Type: Bug | Status: assigned
Component: Testing framework | Version: 1.1
Severity: Normal | Resolution:
Keywords: test client, | Triage Stage: Accepted
redirect, prepend_www |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by jamesbeith):
I’ve been experiencing this and am using `SERVER_NAME` and `host` as a
fix. Though as the number of tests I write for the project grows it
doesn’t seem the most ideal solution.
{{{
response = self.client.get('/redirect/', follow=True,
SERVER_NAME='www.testserver')
self.assertRedirects(response, '/result/', status_code=301,
host='www.testserver')
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/12227#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.b03479d94d6445ea589d3348c9f6a441%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.