diff options
| author | Chris Beaven <smileychris@gmail.com> | 2010-12-01 22:25:17 +0000 |
|---|---|---|
| committer | Chris Beaven <smileychris@gmail.com> | 2010-12-01 22:25:17 +0000 |
| commit | dceaa82dec9f97ac77754dfdc737852d8171c8a2 (patch) | |
| tree | f24cbd8cf821e5b0990d02d541d0ce42c2976a8a /tests/regressiontests | |
| parent | cd847db17fbb578c580c54ac41dcb899ef3b9cb0 (diff) | |
Fixed #14809 -- broken login related tests after r14733.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14764 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests')
| -rw-r--r-- | tests/regressiontests/httpwrappers/tests.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/regressiontests/httpwrappers/tests.py b/tests/regressiontests/httpwrappers/tests.py index 6d452524fe..65b06a1d77 100644 --- a/tests/regressiontests/httpwrappers/tests.py +++ b/tests/regressiontests/httpwrappers/tests.py @@ -71,6 +71,16 @@ class QueryDictTests(unittest.TestCase): self.assertEqual(q.urlencode(), 'foo=bar') + def test_urlencode(self): + q = QueryDict('', mutable=True) + q['next'] = '/a&b/' + self.assertEqual(q.urlencode(), 'next=%2Fa%26b%2F') + self.assertEqual(q.urlencode(safe='/'), 'next=/a%26b/') + q = QueryDict('', mutable=True) + q['next'] = u'/t\xebst&key/' + self.assertEqual(q.urlencode(), 'next=%2Ft%C3%ABst%26key%2F') + self.assertEqual(q.urlencode(safe='/'), 'next=/t%C3%ABst%26key/') + def test_mutable_copy(self): """A copy of a QueryDict is mutable.""" q = QueryDict('').copy() |
