mirror of
https://github.com/django/django.git
synced 2025-11-01 12:25:37 +00:00
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
This commit is contained in:
parent
6a4f164a6f
commit
f2303b6f7a
4 changed files with 19 additions and 5 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue