def it_can_generate_rels_file_xml(self):
     expected_xml = (
         '<?xml version=\'1.0\' encoding=\'UTF-8\' standalone=\'yes\'?>\n'
         '<Relationships xmlns="http://schemas.openxmlformats.org/package'
         '/2006/relationships"/>'.encode('utf-8')
     )
     assert CT_Relationships.new().xml == expected_xml
 def it_can_construct_a_new_relationships_element(self):
     rels = CT_Relationships.new()
     expected_xml = (
         '<Relationships xmlns="http://schemas.openxmlformats.org/package'
         '/2006/relationships"/>\n'
     )
     assert serialize_for_reading(rels) == expected_xml
Beispiel #3
0
 def it_can_build_rels_element_incrementally(self):
     # setup ------------------------
     rels = CT_Relationships.new()
     # exercise ---------------------
     rels.add_rel('rId1', 'http://reltype1', 'docProps/core.xml')
     rels.add_rel('rId2', 'http://linktype', 'http://some/link', True)
     rels.add_rel('rId3', 'http://reltype2', '../slides/slide1.xml')
     # verify -----------------------
     expected_rels_xml = a_Relationships().xml
     assert actual_xml(rels) == expected_rels_xml
Beispiel #4
0
 def it_can_build_rels_element_incrementally(self):
     # setup ------------------------
     rels = CT_Relationships.new()
     # exercise ---------------------
     rels.add_rel('rId1', 'http://reltype1', 'docProps/core.xml')
     rels.add_rel('rId2', 'http://linktype', 'http://some/link', True)
     rels.add_rel('rId3', 'http://reltype2', '../slides/slide1.xml')
     # verify -----------------------
     expected_rels_xml = a_Relationships().xml
     assert serialize_for_reading(rels) == expected_rels_xml