diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2007-07-21 05:17:20 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2007-07-21 05:17:20 +0000 |
| commit | f2303b6f7aa744f8edf4ecf28b7c88db222386f8 (patch) | |
| tree | 2637dcd7f11328659e2fc9d150534e5e88fbdaf4 /tests/modeltests/test_client/models.py | |
| parent | 6a4f164a6fde5665dcc7377bbda4faef89dee614 (diff) | |
Fixed #4402 -- Modified test client to allow multi-valued inputs on GET requests. Thanks for the suggestion, eddymul@gmail.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5741 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/modeltests/test_client/models.py')
| -rw-r--r-- | tests/modeltests/test_client/models.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/modeltests/test_client/models.py b/tests/modeltests/test_client/models.py index 91c5d8c72f..951a41d61c 100644 --- a/tests/modeltests/test_client/models.py +++ b/tests/modeltests/test_client/models.py @@ -122,6 +122,18 @@ class ClientTest(TestCase): self.assertEqual(response.status_code, 200) self.assertTemplateUsed(response, "Valid POST Template") + def test_valid_form_with_hints(self): + "GET a form, providing hints in the GET data" + hints = { + 'text': 'Hello World', + 'multi': ('b','c','e') + } + response = self.client.get('/test_client/form_view/', data=hints) + self.assertEqual(response.status_code, 200) + self.assertTemplateUsed(response, "Form GET Template") + # Check that the multi-value data has been rolled out ok + self.assertContains(response, 'Select a valid choice.', 0) + def test_incomplete_data_form(self): "POST incomplete data to a form" post_data = { |
