Пример #1
0
 def test_filled(self):
     formdata = WebobInputWrapper(self.filled_mdict)
     self.assertTrue(formdata)
     self.assertEqual(len(formdata), 3)
     self.assertEqual(list(formdata), ['a','b','a'])
     self.assertTrue('b' in formdata)
     self.assertTrue('fake' not in formdata)
     self.assertEqual(formdata.getlist('a'), ['Apple', 'Cherry'])
     self.assertEqual(formdata.getlist('b'), ['Banana'])
     self.assertEqual(formdata.getlist('fake'), [])
Пример #2
0
 def test_filled(self):
     formdata = WebobInputWrapper(self.filled_mdict)
     self.assert_(formdata)
     self.assertEqual(len(formdata), 3)
     self.assertEqual(list(formdata), ['a','b','a'])
     self.assert_('b' in formdata)
     self.assert_('fake' not in formdata)
     self.assertEqual(formdata.getlist('a'), ['Apple', 'Cherry'])
     self.assertEqual(formdata.getlist('b'), ['Banana'])
     self.assertEqual(formdata.getlist('fake'), [])
Пример #3
0
 def test_empty(self):
     formdata = WebobInputWrapper(self.empty_mdict)
     self.assertFalse(formdata)
     self.assertEqual(len(formdata), 0)
     self.assertEqual(list(formdata), [])
     self.assertEqual(formdata.getlist('fake'), [])
Пример #4
0
 def test_empty(self):
     formdata = WebobInputWrapper(self.empty_mdict)
     self.assert_(not formdata)
     self.assertEqual(len(formdata), 0)
     self.assertEqual(list(formdata), [])
     self.assertEqual(formdata.getlist('fake'), [])