def new(cls, partname, package, slide_layout_part): """Return newly-created blank slide part. The new slide-part has `partname` and a relationship to `slide_layout_part`. """ slide_part = cls(partname, CT.PML_SLIDE, package, CT_Slide.new()) slide_part.relate_to(slide_layout_part, RT.SLIDE_LAYOUT) return slide_part
def new(cls, partname, package, slide_layout_part): """ Return a newly-created blank slide part having *partname* and related to *slide_layout_part*. """ sld = CT_Slide.new() slide_part = cls(partname, CT.PML_SLIDE, sld, package) slide_part.relate_to(slide_layout_part, RT.SLIDE_LAYOUT) return slide_part
def it_knows_the_minimal_element_xml_for_a_slide(self): path = absjoin(test_file_dir, "minimal_slide.xml") sld = CT_Slide.new() with open(path, "r") as f: expected_xml = f.read() assert sld.xml == expected_xml