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')
 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')
 def test_cleanup_address_p_bullet(self):
     xml = u"""<P>• Bullet: value</P>"""
     self.assertEqual(address.cleanup_address_p(etree.fromstring(xml)),
                      'Bullet: value')
 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!')
 def test_cleanup_address_p_bullet(self):
     xml = u"""<P>• Bullet: value</P>"""
     self.assertEqual(address.cleanup_address_p(etree.fromstring(xml)),
                      'Bullet: value')
 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')
 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!')
 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')