diff options
author | kali <kali@leap.se> | 2012-08-30 01:11:42 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-08-30 01:20:37 +0900 |
commit | e6483d20a5500e86b5fa4e7da63f911641b7e9dd (patch) | |
tree | b1b2d07c1f105dad103f8fc8302d70ce50e4817f /src/leap/eip/tests/test_checks.py | |
parent | 1263cd7a3cfca81ae3e6976a489e2d3d4013d64b (diff) |
fix config load method
it was not updating config dict
Diffstat (limited to 'src/leap/eip/tests/test_checks.py')
-rw-r--r-- | src/leap/eip/tests/test_checks.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/leap/eip/tests/test_checks.py b/src/leap/eip/tests/test_checks.py index e53a2a1d..5697ad10 100644 --- a/src/leap/eip/tests/test_checks.py +++ b/src/leap/eip/tests/test_checks.py @@ -93,19 +93,26 @@ class EIPCheckTest(BaseLeapTest): # This error will be possible catched in a different # place, when JSONConfig does validation of required fields. - sampleconfig = copy.copy(testdata.EIP_SAMPLE_JSON) + # passing direct config + with self.assertRaises(eipexceptions.EIPMissingDefaultProvider): + checker.check_is_there_default_provider(config={}) + + # ok. now, messing with real files... # blank out default_provider + sampleconfig = copy.copy(testdata.EIP_SAMPLE_JSON) sampleconfig['provider'] = None - eipcfg_path = checker._get_default_eipconfig_path() + eipcfg_path = checker.eipconfig.filename with open(eipcfg_path, 'w') as fp: json.dump(sampleconfig, fp) with self.assertRaises(eipexceptions.EIPMissingDefaultProvider): + checker.eipconfig.load(fromfile=eipcfg_path) checker.check_is_there_default_provider() sampleconfig = testdata.EIP_SAMPLE_JSON - eipcfg_path = checker._get_default_eipconfig_path() + #eipcfg_path = checker._get_default_eipconfig_path() with open(eipcfg_path, 'w') as fp: json.dump(sampleconfig, fp) + checker.eipconfig.load() self.assertTrue(checker.check_is_there_default_provider()) def test_fetch_definition(self): |