@@ -21,14 +21,28 @@ def it_can_read_existing_prop_values(self, prop_get_fixture):
2121 actual_value = custom_properties [prop_name ]
2222 assert actual_value == exp_value
2323
24- def it_can_change_existing_prop_values (self ):
25- pass
24+ def it_can_change_existing_prop_values (self , custom_properties_default , prop_set_fixture ):
25+ _ , prop_name , value , _ = prop_set_fixture
26+ assert custom_properties_default [prop_name ] != value
27+ custom_properties_default [prop_name ] = value
28+ assert custom_properties_default [prop_name ] == value
2629
2730 def it_can_set_new_prop_values (self , prop_set_fixture ):
2831 custom_properties , prop_name , value , exp_xml = prop_set_fixture
2932 custom_properties [prop_name ] = value
3033 assert custom_properties ._element .xml == exp_xml
3134
35+ def it_can_iterate_existing_props (self , custom_properties_default ):
36+ exp_names = ['CustomPropBool' , 'CustomPropInt' , 'CustomPropString' ]
37+
38+ # check 1: as list
39+ assert list (custom_properties_default ) == ['CustomPropBool' , 'CustomPropInt' , 'CustomPropString' ]
40+
41+ # check 2: use iterator
42+ exp_names_iter = iter (exp_names )
43+ for prop_name in custom_properties_default :
44+ assert prop_name == next (exp_names_iter )
45+
3246 # fixtures -------------------------------------------------------
3347
3448 @pytest .fixture (params = [
0 commit comments