Started cleanup work on CLI class, added unit tests for CLI.parse_globals()

This commit is contained in:
Jason Gerard DeRose 2008-10-27 14:49:34 -06:00
parent 10026284db
commit 17fd9cc431
2 changed files with 7 additions and 1 deletions

View File

@ -394,7 +394,8 @@ class CLI(object):
self.cmd_argv = tuple(args) self.cmd_argv = tuple(args)
def bootstrap(self): def bootstrap(self):
pass self.__doing('bootstrap')
self.parse_globals()
# if options.interactive == True: # if options.interactive == True:
# self.__all_interactive = True # self.__all_interactive = True

View File

@ -139,3 +139,8 @@ class test_CLI(ClassChecker):
assert o.cmd_argv == cmd_argv assert o.cmd_argv == cmd_argv
e = raises(StandardError, o.parse_globals) e = raises(StandardError, o.parse_globals)
assert str(e) == 'CLI.parse_globals() already called' assert str(e) == 'CLI.parse_globals() already called'
def test_bootstrap(self):
"""
Test the `ipalib.cli.CLI.bootstrap` method.
"""