def test_create_link2(self): link = Link('http://example.com/', name='link2', target_frame='_blank', style='style1', visited_style='style2') expected = ('<text:a xlink:href="http://example.com/" ' 'office:name="link2" office:target-frame-name="_blank" ' 'xlink:show="new" text:style-name="style1" ' 'text:visited-style-name="style2"/>') self.assertEqual(link.serialize(), expected)
def test_create_link1(self): link = Link("http://example.com/") expected = '<text:a xlink:href="http://example.com/"/>' self.assertEqual(link.serialize(), expected)