testserver: fix standalone_self_test()

parent 46455026
from __future__ import absolute_import from __future__ import absolute_import
import argparse import argparse
import fileinput
import itertools import itertools
import logging import logging
import os import os
...@@ -233,14 +232,14 @@ def standalone_self_test(): ...@@ -233,14 +232,14 @@ def standalone_self_test():
""" """
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
argparser = argparse.ArgumentParser() argparser = argparse.ArgumentParser()
argparser.add_argument('--scenario', help='path to test scenario', argparser.add_argument('--scenario', help='absolute path to test scenario',
required=False) required=False)
argparser.add_argument('--step', help='step # in the scenario (default: first)', argparser.add_argument('--step', help='step # in the scenario (default: first)',
required=False, type=int) required=False, type=int)
args = argparser.parse_args() args = argparser.parse_args()
if args.scenario: if args.scenario:
test_scenario, test_config_text = scenario.parse_file(fileinput.input(args.scenario)) test_scenario, test_config_text = scenario.parse_file(args.scenario)
test_config = scenario.parse_config(test_config_text, True, os.getcwd()) test_config, _ = scenario.parse_config(test_config_text, True, os.getcwd())
else: else:
test_scenario, test_config = empty_test_case() test_scenario, test_config = empty_test_case()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment