1010
1111import pytest
1212
13- from datetime import datetime
14-
1513from docx .opc .customprops import CustomProperties
16- from docx .oxml .customprops import CT_CustomProperties
1714from docx .oxml import parse_xml
18- from lxml import etree
15+
1916
2017class DescribeCustomProperties (object ):
2118
@@ -51,12 +48,12 @@ def prop_get_fixture(self, request, custom_properties_default):
5148 ])
5249 def prop_set_fixture (self , request , custom_properties_blank ):
5350 prop_name , str_type , str_value , value = request .param
54- expected_xml = self .customProperties (prop_name , str_type , str_value )
51+ expected_xml = self .build_custom_properties_xml (prop_name , str_type , str_value )
5552 return custom_properties_blank , prop_name , value , expected_xml
5653
5754 # fixture components ---------------------------------------------
5855
59- def customProperties (self , prop_name , str_type , str_value ):
56+ def build_custom_properties_xml (self , prop_name , str_type , str_value ):
6057 tmpl = (
6158 '<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/custom-properties" '
6259 'xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">\n '
@@ -65,7 +62,7 @@ def customProperties(self, prop_name, str_type, str_value):
6562 ' </property>\n '
6663 '</Properties>'
6764 )
68- return tmpl % (prop_name , str_type , str_value , str_type )
65+ return tmpl % (prop_name , str_type , str_value , str_type )
6966
7067 @pytest .fixture
7168 def custom_properties_blank (self ):
0 commit comments