redhat-qe-security / SCAutolib

Library for automation of smart card testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Class for config file

x00Pavel opened this issue · comments

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:

  1. Create ConfigParser object: 3 lines (instantiate + set a default value for the object)
  2. set value: several lines depending on how much editing would be done
  3. Write: 2 - 3 lines

All this can be replaced with a class that inherited ConfigParser class and all workflow would by in 3 lines:

  1. Instatiate - all values are set in the constructor
  2. Set value - method could take a list of fields that need to be edited
  3. Write

Resolved in PR