diff options
| author | Claude Paroz <claude@2xlibre.net> | 2014-10-14 09:26:13 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2014-10-14 09:59:14 +0200 |
| commit | 555952c3e6fd0f4041ea7012d216641f6ffafe5b (patch) | |
| tree | 41a96c15cf762b30563316bfb0626d44c4fa5858 /tests | |
| parent | 6398ebab93a6a19afd1aee9cef120f052a801717 (diff) | |
[1.7.x] Adapted invalid cookie test to all Python versions
Refs #23638. Older Python versions are less strict when parsing
invalid cookie content. The test just has to ensure Django doesn't
crash.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/handlers/tests.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/handlers/tests.py b/tests/handlers/tests.py index d9d2487396..39e08f467a 100644 --- a/tests/handlers/tests.py +++ b/tests/handlers/tests.py @@ -88,7 +88,10 @@ class HandlerTests(TestCase): environ = RequestFactory().get('/').environ environ['HTTP_COOKIE'] = 'x=W\x03c(h]\x8e' request = WSGIRequest(environ) - self.assertEqual(request.COOKIES, {}) + # We don't test COOKIES content, as the result might differ between + # Python version because parsing invalid content became stricter in + # latest versions. + self.assertIsInstance(request.COOKIES, dict) class TransactionsPerRequestTests(TransactionTestCase): |
