示例#1
0
    def __init__(self, context, language):
        # use PyExecJS for executing NodeJS code - https://pypi.python.org/pypi/PyExecJS
        # use Pyjnius for executing Java code - http://pyjnius.readthedocs.io/en/latest/index.html
        if context.remote:
            remote_util.getNetwork()
        self.networkConfigFile = self.generateNetworkConfig(context)

        if language.lower() == "nodejs":
            self.initializeNode()
        else:
            raise "Language {} is not supported in the test framework yet.".format(language)

        # use CLI for non implemented functions
        self.cli = CLIInterface()
示例#2
0
    def __init__(self, context, language):
        if context.remote:
            remote_util.getNetwork()
        self.networkConfigFile = self.generateNetworkConfig(context)

        # use CLI for non implemented functions
        self.cli = CLIInterface()
        self.context = context

        if language.lower() == "nodejs":
            self.initializeNode()
        else:
            raise "Language {} is not supported in the test framework yet.".format(
                language)