def it_constructs_a_default_settings_part_to_help(self): package = OpcPackage() settings_part = SettingsPart.default(package) assert isinstance(settings_part, SettingsPart) assert settings_part.partname == '/word/settings.xml' assert settings_part.content_type == CT.WML_SETTINGS assert settings_part.package is package assert len(settings_part.element) == 6
def it_constructs_a_default_settings_part_to_help(self): package = OpcPackage() settings_part = SettingsPart.default(package) assert isinstance(settings_part, SettingsPart) assert settings_part.partname == '/word/settings.xml' assert settings_part.content_type == CT.WML_SETTINGS assert settings_part.package is package assert len(settings_part.element) == 6
def _settings_part(self): """ A |SettingsPart| object providing access to the document-level settings for this document. Creates a default settings part if one is not present. """ try: return self.part_related_by(RT.SETTINGS) except KeyError: settings_part = SettingsPart.default(self.package) self.relate_to(settings_part, RT.SETTINGS) return settings_part
def _settings_part(self): """ A |SettingsPart| object providing access to the document-level settings for this document. Creates a default settings part if one is not present. """ try: return self.part_related_by(RT.SETTINGS) except KeyError: settings_part = SettingsPart.default(self.package) self.relate_to(settings_part, RT.SETTINGS) return settings_part
def settings_fixture(self, Settings_, settings_): settings_elm = element('w:settings') settings_part = SettingsPart(None, None, settings_elm, None) return settings_part, Settings_, settings_