diff options
author | kali <kali@leap.se> | 2012-08-28 23:36:39 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-08-29 03:25:46 +0900 |
commit | 7a8f4db1a4743582c34a52ab448eece0e7689bc8 (patch) | |
tree | 19cb1b95d6cf1e7fe3fecd4027f472bc7faa7715 /src/leap/eip/checks.py | |
parent | 06883461f2daa616b2e3c842f53d9422703cd9c7 (diff) |
test for eip_config_checker called from eip_connection run_checks method
also:
- changed name EIPChecker -> EipConfigChecker
- Added class documentation
Diffstat (limited to 'src/leap/eip/checks.py')
-rw-r--r-- | src/leap/eip/checks.py | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/src/leap/eip/checks.py b/src/leap/eip/checks.py index 794e69e1..27320b1f 100644 --- a/src/leap/eip/checks.py +++ b/src/leap/eip/checks.py @@ -15,21 +15,40 @@ from leap.eip import constants as eipconstants from leap.eip import exceptions as eipexceptions from leap.util.fileutil import mkdir_p +""" +EIPConfigChecker +---------- +this is the first of 3 consecutive checks that we're implementing. -class EIPChecker(object): +It is used from the eip conductor (a instance of EIPConnection that is +managed from the QtApp), running run_all method before trying to call +`connect` or any other of the state switching methods. + +It checks that the needed files are provided or can be discovered over the +net. Much of these tests are not specific to EIP module, and can be splitted +into base.tests to be invoked by the base leap init routines. +However, I'm testing them alltogether for the sake of having the whole unit +reachable and testable as a whole. + +Other related checkers - not implemented yet -: +* LeapNetworkChecker +* ProviderCertChecker +""" + + +class EIPConfigChecker(object): """ Several tests needed to ensure a EIPConnection - can be sucessful + can be sucessfully established. use run_all to run all checks. """ def __init__(self, fetcher=requests): - """ - we do not want to accept too many - argument on init. we want tests - to be explicitely run. - """ + # we do not want to accept too many + # argument on init. + # we want tests + # to be explicitely run. self.config = None self.fetcher = fetcher @@ -100,7 +119,6 @@ class EIPChecker(object): def fetch_definition(self, skip_download=False, config=None, uri=None): - # check_and_get_definition_file """ fetches a definition file from server """ |