コード例 #1
0
 def test_cleanup_address_p_smushed_tag(self):
     xml = """<P>See<E T="03">This</E></P>"""
     self.assertEqual(address.cleanup_address_p(etree.fromstring(xml)),
                      'See This')
コード例 #2
0
 def test_cleanup_address_p_subchildren(self):
     xml = """<P>Oh<E T="03">yeah</E>man</P>"""
     self.assertEqual(address.cleanup_address_p(etree.fromstring(xml)),
                      'Oh yeah man')
コード例 #3
0
 def test_cleanup_address_p_bullet(self):
     xml = u"""<P>• Bullet: value</P>"""
     self.assertEqual(address.cleanup_address_p(etree.fromstring(xml)),
                      'Bullet: value')
コード例 #4
0
 def test_cleanup_address_p_without_contents(self):
     xml = """<P>See<E /> here!</P>"""
     self.assertEqual(address.cleanup_address_p(etree.fromstring(xml)),
                      'See here!')
コード例 #5
0
 def test_cleanup_address_p_bullet(self):
     xml = u"""<P>• Bullet: value</P>"""
     self.assertEqual(address.cleanup_address_p(etree.fromstring(xml)),
                      'Bullet: value')
コード例 #6
0
 def test_cleanup_address_p_subchildren(self):
     xml = """<P>Oh<E T="03">yeah</E>man</P>"""
     self.assertEqual(address.cleanup_address_p(etree.fromstring(xml)),
                      'Oh yeah man')
コード例 #7
0
 def test_cleanup_address_p_without_contents(self):
     xml = """<P>See<E /> here!</P>"""
     self.assertEqual(address.cleanup_address_p(etree.fromstring(xml)),
                      'See here!')
コード例 #8
0
 def test_cleanup_address_p_smushed_tag(self):
     xml = """<P>See<E T="03">This</E></P>"""
     self.assertEqual(address.cleanup_address_p(etree.fromstring(xml)),
                      'See This')