| 1 | | Apologies, typo in my original test. Good catch. Updated test and failure below |
| 2 | | |
| 3 | | {{{#!python |
| 4 | | |
| 5 | | def test_post_multi_select(self): |
| 6 | | "POST SELECT multiple data to a view" |
| 7 | | post_data = QueryDict(mutable=True) |
| 8 | | post_data.update({'value':37}) |
| 9 | | post_data.update({'value':38}) |
| 10 | | response = self.client.post('/post_view/', post_data) |
| 11 | | |
| 12 | | # Check some response details |
| 13 | | self.assertEqual(response.status_code, 200) |
| 14 | | self.assertEqual(response.context['data'], ['37', '38']) |
| 15 | | self.assertEqual(response.templates[0].name, 'POST Template') |
| 16 | | self.assertContains(response, 'Data received') |
| 17 | | |
| 18 | | }}} |
| | 1 | Apologies, typo in my original test. Good catch. Updated test in description and failure below: |