Ticket #2446 (closed defect: fixed)
test_controllers broken with WebTest 1.2.1
| Reported by: | chrisz | Owned by: | chrisz |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1.2 |
| Component: | TurboGears | Version: | 1.1 |
| Severity: | normal | Keywords: | webtest, flash |
| Cc: |
Description
After upgrading from WebTest 1.2 to 1.2.1 (44:1d23a69a73fa at bitbucket), the tests
- test_flash_on_redirect and
- test_flash_redirect_with_trouble_chars
in test_controllers are failing for both TG 1.1 and 1.5.
This probably has something to do with changed cookie and/or redirection handling in WebTest and needs to be investigated a bit.
Change History
comment:2 Changed 2 years ago by chrisz
Already fixed the second issue in r7012.
The WebTest bug still needs to be fixed to make our test suite pass again with the current WebTest trunk. Leaving this ticket open as a reminder.
comment:4 Changed 2 years ago by Chris Arndt
- Keywords webtest, added; webtest removed
- Owner set to chrisz
Nice catch!
comment:5 Changed 23 months ago by chrisz
- Milestone changed from 1.1.x bugfix to 1.1.2
Still trying to get this fixed in WebTest. Leaving this open as a reminder to require the new WebTest version in TG 1.1.2.
comment:6 Changed 16 months ago by cito
- Status changed from new to closed
- Resolution set to fixed
This has now been fixed in WebTest 1.2.2, and it has been added as required version in r7080.
Analyzed this and found that there are actually two problems:
First, after a recent change to WebTest, an additional pair of quotes can be wrongly added around cookie values. I'll try to clarify this with Ian.
Second, TG - via its util module - uses the URL quoting/unquoting mechanism for cookie values. This is different from the quoting/unquoting mechanism used by the Python Cookie module which is used for holding the request and response cookies. There may be incompatibilities or double encodings because of that. I'll investigate this further after the above issue with WebTest will be fixed.