Back to index

python3.2  3.2.2
Public Member Functions
test.test_sax.XmlTestBase Class Reference
Inheritance diagram for test.test_sax.XmlTestBase:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def verify_empty_attrs
def verify_empty_nsattrs
def verify_attrs_wattr

Detailed Description

Definition at line 30 of file test_sax.py.


Member Function Documentation

def test.test_sax.XmlTestBase.verify_attrs_wattr (   self,
  attrs 
)

Definition at line 65 of file test_sax.py.

00065 
00066     def verify_attrs_wattr(self, attrs):
00067         self.assertEqual(attrs.getLength(), 1)
00068         self.assertEqual(attrs.getNames(), ["attr"])
00069         self.assertEqual(attrs.getQNames(), ["attr"])
00070         self.assertEqual(len(attrs), 1)
00071         self.assertIn("attr", attrs)
00072         self.assertEqual(list(attrs.keys()), ["attr"])
00073         self.assertEqual(attrs.get("attr"), "val")
00074         self.assertEqual(attrs.get("attr", 25), "val")
00075         self.assertEqual(list(attrs.items()), [("attr", "val")])
00076         self.assertEqual(list(attrs.values()), ["val"])
00077         self.assertEqual(attrs.getValue("attr"), "val")
00078         self.assertEqual(attrs.getValueByQName("attr"), "val")
00079         self.assertEqual(attrs.getNameByQName("attr"), "attr")
00080         self.assertEqual(attrs["attr"], "val")
00081         self.assertEqual(attrs.getQNameByName("attr"), "attr")

Here is the call graph for this function:

Here is the caller graph for this function:

def test.test_sax.XmlTestBase.verify_empty_attrs (   self,
  attrs 
)

Definition at line 31 of file test_sax.py.

00031 
00032     def verify_empty_attrs(self, attrs):
00033         self.assertRaises(KeyError, attrs.getValue, "attr")
00034         self.assertRaises(KeyError, attrs.getValueByQName, "attr")
00035         self.assertRaises(KeyError, attrs.getNameByQName, "attr")
00036         self.assertRaises(KeyError, attrs.getQNameByName, "attr")
00037         self.assertRaises(KeyError, attrs.__getitem__, "attr")
00038         self.assertEqual(attrs.getLength(), 0)
00039         self.assertEqual(attrs.getNames(), [])
00040         self.assertEqual(attrs.getQNames(), [])
00041         self.assertEqual(len(attrs), 0)
00042         self.assertNotIn("attr", attrs)
00043         self.assertEqual(list(attrs.keys()), [])
00044         self.assertEqual(attrs.get("attrs"), None)
00045         self.assertEqual(attrs.get("attrs", 25), 25)
00046         self.assertEqual(list(attrs.items()), [])
00047         self.assertEqual(list(attrs.values()), [])

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 48 of file test_sax.py.

00048 
00049     def verify_empty_nsattrs(self, attrs):
00050         self.assertRaises(KeyError, attrs.getValue, (ns_uri, "attr"))
00051         self.assertRaises(KeyError, attrs.getValueByQName, "ns:attr")
00052         self.assertRaises(KeyError, attrs.getNameByQName, "ns:attr")
00053         self.assertRaises(KeyError, attrs.getQNameByName, (ns_uri, "attr"))
00054         self.assertRaises(KeyError, attrs.__getitem__, (ns_uri, "attr"))
00055         self.assertEqual(attrs.getLength(), 0)
00056         self.assertEqual(attrs.getNames(), [])
00057         self.assertEqual(attrs.getQNames(), [])
00058         self.assertEqual(len(attrs), 0)
00059         self.assertNotIn((ns_uri, "attr"), attrs)
00060         self.assertEqual(list(attrs.keys()), [])
00061         self.assertEqual(attrs.get((ns_uri, "attr")), None)
00062         self.assertEqual(attrs.get((ns_uri, "attr"), 25), 25)
00063         self.assertEqual(list(attrs.items()), [])
00064         self.assertEqual(list(attrs.values()), [])

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: