def test_option_override(self): options = FakeOptions() options.config = ["config/old-style.conf"] options.option = ["owner.address=overridden"] self.foo = ConsoleTank(options, None) self.foo.configure() res = self.foo.core.get_option("owner", "address") logging.debug(res) self.assertEquals("overridden", res)
action='store_true', help="Less console output, only errors and warnings") parser.add_option( '-s', '--scheduled-start', action='store', dest='scheduled_start', help= "Start test at specified time, format 'YYYY-MM-DD hh:mm:ss', date part is optional" ) parser.add_option('-v', '--verbose', action='store_true', help="More console output, +debug messages") completion_helper = CompletionHelperOptionParser() completion_helper.handle_request(parser) options, ammofile = parser.parse_args() worker = ConsoleTank(options, ammofile) worker.init_logging() try: worker.configure() rc = worker.perform_test() exit(rc) except Exception, ex: logging.error("Exception: %s", ex) logging.debug("Exception: %s", traceback.format_exc(ex)) exit(1)
def setUp(self): tank = ConsoleTank(FakeOptions(), None) tank.init_logging() self.foo = ConfigManager()
def test_option_old_convert(self): options = FakeOptions() options.config = ["data/old_to_migrate.conf"] self.foo = ConsoleTank(options, None) self.foo.configure()
def setUp(self): opts = FakeOptions() opts.no_rc = False opts.scheduled_start = datetime.datetime.now().strftime('%H:%M:%S') self.foo = ConsoleTank(opts, None) self.foo.set_baseconfigs_dir('full')