Little refactor and add test cases to conf.py
authorHuang Hao <hao.h.huang@intel.com>
Fri, 7 Sep 2012 12:06:08 +0000 (20:06 +0800)
committerHuang Hao <hao.h.huang@intel.com>
Mon, 10 Sep 2012 06:25:25 +0000 (14:25 +0800)
commitd327d076bd3380c86ee8456176e298604378deb5
tree4cf11d68da66ac9fb3511058e15b93b2cbd1a572
parentfa8b8a97e670c738cad3de9b6efda0c1c3bc97b0
Little refactor and add test cases to conf.py

- change BrainConfigParser.read() to read_one() since the code only
    use this function to read one config file. It's simpler.
- remove BrainConfigParser.check_opt() since no code use it.
- remove else branch in ConfigMgr.get() since the code can still
    work if val is empty string. Also add a test case for it.
- remove ConfigMgr.set() since no code use it. passwdx set back
    in _check_passwd(), and we will not use this set() function to
    add option into config file.
- change implementation of Fixture class, it doesn't call start()
    and stop() methods which introduced by mock0.7
- add more test cases for conf.py

Change-Id: I598f8943f98f067aa584fa4be811492c70226f23
gitbuildsys/conf.py
tests/test_config.py
tests/test_passwdx.py [new file with mode: 0644]
tests/test_profile.py
tests/testdata/ini/bad_passwdx.ini [new file with mode: 0644]
tests/testdata/ini/empty_passwdx.ini [new file with mode: 0644]
tests/testdata/ini/normal_passwdx.ini [new file with mode: 0644]
tests/testdata/ini/passwdx.ini [new file with mode: 0644]
tests/testdata/ini/plain_passwd.ini [new file with mode: 0644]
tests/testdata/ini/plain_passwd2.ini [new file with mode: 0644]
tests/testdata/ini/without_section_header.ini [new file with mode: 0644]