diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2010-12-23 21:39:34 +0000 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2010-12-23 21:39:34 +0000 |
| commit | b168c1b1f9f1b4933bdad8fcfda1833775f68065 (patch) | |
| tree | b94189097f81bc9b0f48afe6a8111b59648b1cd5 /tests | |
| parent | 6c32577d31cdb26fa83c22bb3276e850447e196a (diff) | |
[1.2.X] Fixed #14939: Don't strip ;-parameters from URLs in the test client.
Backport of [15027] from trunk
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15045 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/modeltests/test_client/models.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/modeltests/test_client/models.py b/tests/modeltests/test_client/models.py index 654f649298..82fb70f038 100644 --- a/tests/modeltests/test_client/models.py +++ b/tests/modeltests/test_client/models.py @@ -266,6 +266,13 @@ class ClientTest(TestCase): # Check that the response was a 404 self.assertEqual(response.status_code, 404) + def test_url_parameters(self): + "Make sure that URL ;-parameters are not stripped." + response = self.client.get('/test_client/unknown_view/;some-parameter') + + # Check that the path in the response includes it (ignore that it's a 404) + self.assertEqual(response.request['PATH_INFO'], '/test_client/unknown_view/;some-parameter') + def test_view_with_login(self): "Request a page that is protected with @login_required" |
