def test_get_bookmark_start_list(self): bookmark_start = odf_create_bookmark_start(u'你好 Zoé') self.body.append(bookmark_start) get = self.body.get_bookmark_starts()[0] expected = ('<text:bookmark-start text:name="%s"/>' % convert_unicode(u'你好 Zoé')) self.assertEqual(get.serialize(), expected)
def test_get_bookmark_start(self): body = self.body bookmark_start = odf_create_bookmark_start(u"你好 Zoé") body.append_element(bookmark_start) get = body.get_bookmark_start_by_name(u"你好 Zoé") expected = '<text:bookmark-start text:name="%s"/>' % convert_unicode(u"你好 Zoé") self.assertEqual(get.serialize(), expected)
def test_get_bookmark_start(self): body = self.body para = self.body.get_paragraph() bookmark_start = odf_create_bookmark_start(u'你好 Zoé') para.append(bookmark_start) get = body.get_bookmark_start(name=u'你好 Zoé') expected = ('<text:bookmark-start text:name="%s"/>' % convert_unicode(u'你好 Zoé')) self.assertEqual(get.serialize(), expected)
def test_create_bookmark_start(self): bookmark_start = odf_create_bookmark_start(u"你好 Zoé") expected = '<text:bookmark-start text:name="%s"/>' % convert_unicode(u"你好 Zoé") self.assertEqual(bookmark_start.serialize(), expected)
def test_create_bookmark_start(self): bookmark_start = odf_create_bookmark_start(u'你好 Zoé') expected = ('<text:bookmark-start text:name="%s"/>' % convert_unicode(u'你好 Zoé')) self.assertEqual(bookmark_start.serialize(), expected)