示例#1
0
 def test_QueryDict(self):
     qd = QueryDict()
     self.assertTrue(isinstance(qd, dict))
     # __setattr__
     qd.toto = 1
     self.assertEqual(qd.get('toto'), 1)
     # __getattr__
     toto = qd.toto 
     self.assertEqual(toto, 1)
示例#2
0
 def test_QueryDict(self):
     qd = QueryDict()
     self.assertTrue(isinstance(qd, dict))
     # __setattr__
     qd.toto = 1
     self.assertEqual(qd.get('toto'), 1)
     # __getattr__
     toto = qd.toto
     self.assertEqual(toto, 1)
示例#3
0
 def test_QueryDict(self):
     qd = QueryDict()
     self.assertTrue(isinstance(qd, dict))
     # __setattr__
     qd.toto = 1
     self.assertEqual(qd.get('toto'), 1)
     # __getattr__
     toto = qd.toto
     self.assertEqual(toto, 1)
     with self.assertRaises(AttributeError):
         foo = qd.not_an_attribute
 def test_QueryDict(self):
     qd = QueryDict()
     self.assertTrue(isinstance(qd, dict))
     # __setattr__
     qd.toto = 1
     self.assertEqual(qd.get('toto'), 1)
     # __getattr__
     toto = qd.toto
     self.assertEqual(toto, 1)
     with self.assertRaises(AttributeError):
         foo = qd.not_an_attribute