Create a class for the standard creation of config files for that would be edited in the test.
There are already 4 places in the library where the same code is used:
Create ConfigParser object: 3 lines (instantiate + set a default value for the object)
set value: several lines depending on how much editing would be done
Write: 2 - 3 lines
All this can be replaced with a class that inherited ConfigParser class and all workflow would by in 3 lines:
Instatiate - all values are set in the constructor
Set value - method could take a list of fields that need to be edited
Create a class for the standard creation of config files for that would be edited in the test. There are already 4 places in the library where the same code is used:
All this can be replaced with a class that inherited ConfigParser class and all workflow would by in 3 lines: