コード例 #1
0
ファイル: test_xmlutil.py プロジェクト: musabaloyi/vumi
 def test_elemfindall(self):
     """
     `elemfind` finds all sub-elements with the `QualifiedName` or path
     specified.
     """
     self.assertEqual(['<child1 />'],
                      map(tostring, elemfindall(self.root, L.child1)))
     self.assertEqual(['<child2 />', '<child2 />'],
                      map(tostring, elemfindall(self.root, 'child2')))
コード例 #2
0
ファイル: test_xmlutil.py プロジェクト: AndrewCvekl/vumi
 def test_elemfindall(self):
     """
     `elemfind` finds all sub-elements with the `QualifiedName` or path
     specified.
     """
     self.assertEqual(
         ['<child1 />'],
         map(tostring, elemfindall(self.root, L.child1)))
     self.assertEqual(
         ['<child2 />', '<child2 />'],
         map(tostring, elemfindall(self.root, 'child2')))
コード例 #3
0
ファイル: test_xmlutil.py プロジェクト: musabaloyi/vumi
 def test_elemfindall_none(self):
     """
     `elemfind` returns an empty list if the `QualifiedName` or path
     specified cannot be found.
     """
     self.assertEqual([], elemfindall(self.root, L.what))
コード例 #4
0
ファイル: test_xmlutil.py プロジェクト: AndrewCvekl/vumi
 def test_elemfindall_none(self):
     """
     `elemfind` returns an empty list if the `QualifiedName` or path
     specified cannot be found.
     """
     self.assertEqual([], elemfindall(self.root, L.what))