@@ -159,6 +159,10 @@ def it_can_change_its_quick_style_setting(self, quick_set_fixture):
159159 style .quick_style = new_value
160160 assert style ._element .xml == expected_xml
161161
162+ def it_knows_whether_its_locked (self , locked_get_fixture ):
163+ style , expected_value = locked_get_fixture
164+ assert style .locked == expected_value
165+
162166 def it_can_delete_itself_from_the_document (self , delete_fixture ):
163167 style , styles , expected_xml = delete_fixture
164168 style .delete ()
@@ -230,6 +234,17 @@ def id_set_fixture(self, request):
230234 expected_xml = xml (expected_style_cxml )
231235 return style , new_value , expected_xml
232236
237+ @pytest .fixture (params = [
238+ ('w:style' , False ),
239+ ('w:style/w:locked' , True ),
240+ ('w:style/w:locked{w:val=0}' , False ),
241+ ('w:style/w:locked{w:val=1}' , True ),
242+ ])
243+ def locked_get_fixture (self , request ):
244+ style_cxml , expected_value = request .param
245+ style = BaseStyle (element (style_cxml ))
246+ return style , expected_value
247+
233248 @pytest .fixture (params = [
234249 ('w:style{w:type=table}' , None ),
235250 ('w:style{w:type=table}/w:name{w:val=Boofar}' , 'Boofar' ),
0 commit comments