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)
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)
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)