diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2010-12-22 23:55:13 +0000 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2010-12-22 23:55:13 +0000 |
| commit | f117b91b4129b769032518d2b565e33eb0810da6 (patch) | |
| tree | d1651bb2472490c604b897dc9fb05d3cfd1022aa /tests/modeltests/test_client/models.py | |
| parent | f9fba51164f36519e9b2f7917296ddd83b86ef47 (diff) | |
Fixed #14939: Don't strip ;-parameters from URLs in the test client.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15027 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/modeltests/test_client/models.py')
| -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 426cc77686..0960929004 100644 --- a/tests/modeltests/test_client/models.py +++ b/tests/modeltests/test_client/models.py @@ -269,6 +269,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" |
