Exemplo n.º 1
0
 def core_properties(self):
     xml = (
         b'<?xml version=\'1.0\' encoding=\'UTF-8\' standalone=\'yes\'?>'
         b'\n<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.o'
         b'rg/package/2006/metadata/core-properties" xmlns:dc="http://pur'
         b'l.org/dc/elements/1.1/" xmlns:dcmitype="http://purl.org/dc/dcm'
         b'itype/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="h'
         b'ttp://www.w3.org/2001/XMLSchema-instance">\n'
         b'  <cp:contentStatus>DRAFT</cp:contentStatus>\n'
         b'  <dc:creator>python-pptx</dc:creator>\n'
         b'  <dcterms:created xsi:type="dcterms:W3CDTF">2012-11-17T11:07:'
         b'40-05:30</dcterms:created>\n'
         b'  <dc:description/>\n'
         b'  <dc:identifier>GXS 10.2.1ab</dc:identifier>\n'
         b'  <dc:language>US-EN</dc:language>\n'
         b'  <cp:lastPrinted>2014-06-04T04:28:00Z</cp:lastPrinted>\n'
         b'  <cp:keywords>foo bar baz</cp:keywords>\n'
         b'  <cp:lastModifiedBy>Steve Canny</cp:lastModifiedBy>\n'
         b'  <cp:revision>4</cp:revision>\n'
         b'  <dc:subject>Spam</dc:subject>\n'
         b'  <dc:title>Presentation</dc:title>\n'
         b'  <cp:version>1.2.88</cp:version>\n'
         b'</cp:coreProperties>\n'
     )
     return CorePropertiesPart.load(None, None, xml, None)
Exemplo n.º 2
0
 def date_prop_set_fixture(self, request):
     prop_name, tagname, value, str_val, attrs = request.param
     coreProperties = self.coreProperties(None, None)
     core_properties = CorePropertiesPart.load(None, None, None,
                                               coreProperties)
     expected_xml = self.coreProperties(tagname, str_val, attrs)
     return core_properties, prop_name, value, expected_xml
Exemplo n.º 3
0
 def revision_set_fixture(self, request):
     value, str_val = request.param
     coreProperties = self.coreProperties(None, None)
     core_properties = CorePropertiesPart.load(None, None, None,
                                               coreProperties)
     expected_xml = self.coreProperties("cp:revision", str_val)
     return core_properties, value, expected_xml
Exemplo n.º 4
0
 def revision_get_fixture(self, request):
     str_val, expected_revision = request.param
     tagname = "" if str_val is None else "cp:revision"
     coreProperties = self.coreProperties(tagname, str_val)
     core_properties = CorePropertiesPart.load(None, None, None,
                                               coreProperties)
     return core_properties, expected_revision
Exemplo n.º 5
0
 def date_prop_set_fixture(self, request):
     prop_name, tagname, value, str_val, attrs = request.param
     coreProperties = self.coreProperties(None, None)
     core_properties = CorePropertiesPart.load(
         None, None, coreProperties, None
     )
     expected_xml = self.coreProperties(tagname, str_val, attrs)
     return core_properties, prop_name, value, expected_xml
Exemplo n.º 6
0
 def revision_set_fixture(self, request):
     value, str_val = request.param
     coreProperties = self.coreProperties(None, None)
     core_properties = CorePropertiesPart.load(
         None, None, coreProperties, None
     )
     expected_xml = self.coreProperties('cp:revision', str_val)
     return core_properties, value, expected_xml
Exemplo n.º 7
0
 def revision_get_fixture(self, request):
     str_val, expected_revision = request.param
     tagname = '' if str_val is None else 'cp:revision'
     coreProperties = self.coreProperties(tagname, str_val)
     core_properties = CorePropertiesPart.load(
         None, None, coreProperties, None
     )
     return core_properties, expected_revision