Ejemplo n.º 1
0
 def test_string (self):
   attributes = constants.Attributes (3, CONST)
   self.assertEquals (attributes.as_string (), "%08X" % 3)
Ejemplo n.º 2
0
 def test_contains (self):
   attributes = constants.Attributes (3, CONST)
   self.assertTrue ("a" in attributes)
   self.assertFalse ("c" in attributes)
Ejemplo n.º 3
0
 def test_getattr (self):
   attributes = constants.Attributes (3, CONST)
   self.assertTrue (attributes.a)
   self.assertFalse (attributes.c)
Ejemplo n.º 4
0
 def test_getitem_number (self):
   attributes = constants.Attributes (3, CONST)
   self.assertTrue (attributes[1])
   self.assertFalse (attributes[4])
Ejemplo n.º 5
0
 def test_getitem_text (self):
   attributes = constants.Attributes (3, CONST)
   self.assertTrue (attributes["a"])
   self.assertFalse (attributes["c"])
Ejemplo n.º 6
0
 def attributes(self):
     return constants.Attributes(
         self._parent_obj.GetAttributesOf([self._rpidl], -1), SFGAO)