(self)
| 233 | ('__end__', 'item:mapping')]) |
| 234 | |
| 235 | def test_input_unicode(self): |
| 236 | app = self.callFUT('form_unicode_inputs.html') |
| 237 | res = app.get('/form.html') |
| 238 | self.assertEqual(res.status_int, 200) |
| 239 | self.assertTrue(res.content_type.startswith('text/html')) |
| 240 | self.assertEqual(res.charset.lower(), 'utf-8') |
| 241 | |
| 242 | form = res.forms['text_input_form'] |
| 243 | self.assertEqual(form['foo'].value, u('Хармс')) |
| 244 | self.assertEqual(form.submit_fields(), [('foo', u('Хармс'))]) |
| 245 | |
| 246 | form = res.forms['radio_input_form'] |
| 247 | self.assertEqual(form['foo'].selectedIndex, 1) |
| 248 | self.assertEqual(form['foo'].value, u('Блок')) |
| 249 | self.assertEqual(form.submit_fields(), [('foo', u('Блок'))]) |
| 250 | |
| 251 | form = res.forms['checkbox_input_form'] |
| 252 | self.assertEqual(form['foo'].value, u('Хармс')) |
| 253 | self.assertEqual(form.submit_fields(), [('foo', u('Хармс'))]) |
| 254 | |
| 255 | form = res.forms['password_input_form'] |
| 256 | self.assertEqual(form['foo'].value, u('Хармс')) |
| 257 | self.assertEqual(form.submit_fields(), [('foo', u('Хармс'))]) |
| 258 | |
| 259 | def test_input_no_default(self): |
| 260 | app = self.callFUT('form_inputs_with_defaults.html') |
nothing calls this directly
no test coverage detected