Esempio n. 1
0
 def test_data_111(self):
     with self.assertRaises(SystemExit) as err:
         with suppress_stdout():
             test_module.make_form_data_string([])
     self.assertEqual(err.exception.code, 111)
Esempio n. 2
0
 def test_post_data_case(self):
     data = test_module.make_form_data_string(['abc=123'])
     self.assertTrue(
         '<input type="hidden" name="ABC" value="123">' not in data)
Esempio n. 3
0
 def test_data_108_5(self):
     with self.assertRaises(SystemExit) as err:
         with suppress_stdout():
             test_module.make_form_data_string({'key': 'value'})
     self.assertEqual(err.exception.code, 108)
Esempio n. 4
0
 def test_post_data_multiple(self):
     data = test_module.make_form_data_string(['abc=123', 'xyz=456'])
     self.assertTrue('<input type="hidden" name="abc" value="123">' in data)
     self.assertTrue('<input type="hidden" name="xyz" value="456">' in data)