def test_get_bookmark(self):
     body = self.body
     bookmark = odf_create_bookmark(u"你好 Zoé")
     body.append_element(bookmark)
     get = body.get_bookmark_by_name(u"你好 Zoé")
     expected = '<text:bookmark text:name="%s"/>' % convert_unicode(u"你好 Zoé")
     self.assertEqual(get.serialize(), expected)
Example #2
0
 def test_get_bookmark(self):
     body = self.body
     bookmark = odf_create_bookmark(u'你好 Zoé')
     body.append(bookmark)
     get = body.get_bookmark(name=u'你好 Zoé')
     expected = ('<text:bookmark text:name="%s"/>' %
                 convert_unicode(u'你好 Zoé'))
     self.assertEqual(get.serialize(), expected)
Example #3
0
 def test_get_bookmark(self):
     body = self.body
     bookmark = odf_create_bookmark(u'你好 Zoé')
     body.append(bookmark)
     get = body.get_bookmark(name=u'你好 Zoé')
     expected = ('<text:bookmark text:name="%s"/>' %
                 convert_unicode(u'你好 Zoé'))
     self.assertEqual(get.serialize(), expected)
 def test_create_bookmark(self):
     bookmark = odf_create_bookmark(u"你好 Zoé")
     expected = '<text:bookmark text:name="%s"/>' % convert_unicode(u"你好 Zoé")
     self.assertEqual(bookmark.serialize(), expected)
Example #5
0
 def test_create_bookmark(self):
     bookmark = odf_create_bookmark(u'你好 Zoé')
     expected = ('<text:bookmark text:name="%s"/>' %
                 convert_unicode(u'你好 Zoé'))
     self.assertEqual(bookmark.serialize(), expected)