def it_creates_a_new_theme_part_to_help(self, theme_fixture): package_, pn_tmpl, XmlPart_, partname = theme_fixture[:4] theme_elm_, theme_part_ = theme_fixture[4:] theme_part = NotesMasterPart._new_theme_part(package_) package_.next_partname.assert_called_once_with(pn_tmpl) CT_OfficeStyleSheet.new_default.assert_called_once_with() XmlPart_.assert_called_once_with(partname, CT.OFC_THEME, theme_elm_, package_) assert theme_part is theme_part_
def it_creates_a_new_theme_part_to_help(self, theme_fixture): package_, pn_tmpl, XmlPart_, partname = theme_fixture[:4] theme_elm_, theme_part_ = theme_fixture[4:] theme_part = NotesMasterPart._new_theme_part(package_) package_.next_partname.assert_called_once_with(pn_tmpl) CT_OfficeStyleSheet.new_default.assert_called_once_with() XmlPart_.assert_called_once_with(partname, CT.OFC_THEME, theme_elm_, package_) assert theme_part is theme_part_
def it_creates_a_new_theme_part_to_help(self, request, package_, theme_part_): XmlPart_ = class_mock( request, "pptx.parts.slide.XmlPart", return_value=theme_part_ ) theme_elm = element("p:theme") method_mock( request, CT_OfficeStyleSheet, "new_default", autospec=False, return_value=theme_elm, ) pn_tmpl = "/ppt/theme/theme%d.xml" partname = PackURI("/ppt/theme/theme2.xml") package_.next_partname.return_value = partname theme_part = NotesMasterPart._new_theme_part(package_) package_.next_partname.assert_called_once_with(pn_tmpl) CT_OfficeStyleSheet.new_default.assert_called_once_with() XmlPart_.assert_called_once_with(partname, CT.OFC_THEME, package_, theme_elm) assert theme_part is theme_part_