Example #1
0
    def init_plugin(self, config_content=None):
        self.conf = XmlConfigParser()
        if config_content:
            self.conf.setXml(config_content)
        else:
            self.conf.load(default_plugin_file)
        self.p = LoginPlugin(self.console, self.conf)

        self.log.setLevel(logging.DEBUG)
        self.log.info(
            "============================= Login plugin: loading config ============================"
        )
        self.p.onLoadConfig()
        self.log.info(
            "============================= Login plugin: starting  ================================="
        )
        self.p.onStartup()
Example #2
0
    def init_plugin(self, config_content=None):
        self.conf = CfgConfigParser()
        if config_content:
            self.conf.loadFromString(config_content)
        else:
            self.conf.load(b3.getAbsolutePath('@b3/conf/plugin_login.ini'))
        self.p = LoginPlugin(self.console, self.conf)

        self.log.setLevel(logging.DEBUG)
        self.log.info(
            "============================= Login plugin: loading config ============================"
        )
        self.p.onLoadConfig()
        self.log.info(
            "============================= Login plugin: starting  ================================="
        )
        self.p.onStartup()
Example #3
0
class LoginTestCase(B3TestCase):
    """
    Ease testcases that need an working B3 console and need to control the censor plugin config.
    """
    def setUp(self):
        self.log = logging.getLogger('output')
        self.log.propagate = False

        B3TestCase.setUp(self)

        admin_conf = CfgConfigParser()
        admin_conf.load(b3.getAbsolutePath('@b3/conf/plugin_admin.ini'))
        self.adminPlugin = AdminPlugin(self.console, admin_conf)
        when(self.console).getPlugin("admin").thenReturn(self.adminPlugin)
        self.adminPlugin.onLoadConfig()
        self.adminPlugin.onStartup()

        self.console.gameName = "theGame"
        self.console.startup()
        self.log.propagate = True

    def tearDown(self):
        B3TestCase.tearDown(self)

    def init_plugin(self, config_content=None):
        self.conf = CfgConfigParser()
        if config_content:
            self.conf.loadFromString(config_content)
        else:
            self.conf.load(b3.getAbsolutePath('@b3/conf/plugin_login.ini'))
        self.p = LoginPlugin(self.console, self.conf)

        self.log.setLevel(logging.DEBUG)
        self.log.info(
            "============================= Login plugin: loading config ============================"
        )
        self.p.onLoadConfig()
        self.log.info(
            "============================= Login plugin: starting  ================================="
        )
        self.p.onStartup()
    def init_plugin(self, config_content=None):
        self.conf = XmlConfigParser()
        if config_content:
            self.conf.setXml(config_content)
        else:
            self.conf.load(default_plugin_file)
        self.p = LoginPlugin(self.console, self.conf)

        self.log.setLevel(logging.DEBUG)
        self.log.info("============================= Login plugin: loading config ============================")
        self.p.onLoadConfig()
        self.log.info("============================= Login plugin: starting  =================================")
        self.p.onStartup()
    def init_plugin(self, config_content=None):
        self.conf = CfgConfigParser()
        if config_content:
            self.conf.loadFromString(config_content)
        else:
            self.conf.load(b3.getAbsolutePath('@b3/conf/plugin_login.ini'))
        self.p = LoginPlugin(self.console, self.conf)

        self.log.setLevel(logging.DEBUG)
        self.log.info("============================= Login plugin: loading config ============================")
        self.p.onLoadConfig()
        self.log.info("============================= Login plugin: starting  =================================")
        self.p.onStartup()
Example #6
0
class LoginTestCase(B3TestCase):
    """ Ease testcases that need an working B3 console and need to control the censor plugin config """
    def setUp(self):
        self.log = logging.getLogger('output')
        self.log.propagate = False

        B3TestCase.setUp(self)

        admin_conf = XmlConfigParser()
        admin_conf.load(ADMIN_CONFIG_FILE)
        self.adminPlugin = AdminPlugin(self.console, admin_conf)
        when(self.console).getPlugin("admin").thenReturn(self.adminPlugin)
        self.adminPlugin.onLoadConfig()
        self.adminPlugin.onStartup()

        self.console.gameName = "theGame"
        self.console.startup()
        self.log.propagate = True

    def tearDown(self):
        B3TestCase.tearDown(self)

    def init_plugin(self, config_content=None):
        self.conf = XmlConfigParser()
        if config_content:
            self.conf.setXml(config_content)
        else:
            self.conf.load(default_plugin_file)
        self.p = LoginPlugin(self.console, self.conf)

        self.log.setLevel(logging.DEBUG)
        self.log.info(
            "============================= Login plugin: loading config ============================"
        )
        self.p.onLoadConfig()
        self.log.info(
            "============================= Login plugin: starting  ================================="
        )
        self.p.onStartup()
class LoginTestCase(B3TestCase):
    """
    Ease testcases that need an working B3 console and need to control the censor plugin config.
    """

    def setUp(self):
        self.log = logging.getLogger('output')
        self.log.propagate = False

        B3TestCase.setUp(self)

        admin_conf = CfgConfigParser()
        admin_conf.load(b3.getAbsolutePath('@b3/conf/plugin_admin.ini'))
        self.adminPlugin = AdminPlugin(self.console, admin_conf)
        when(self.console).getPlugin("admin").thenReturn(self.adminPlugin)
        self.adminPlugin.onLoadConfig()
        self.adminPlugin.onStartup()

        self.console.gameName = "theGame"
        self.console.startup()
        self.log.propagate = True

    def tearDown(self):
        B3TestCase.tearDown(self)

    def init_plugin(self, config_content=None):
        self.conf = CfgConfigParser()
        if config_content:
            self.conf.loadFromString(config_content)
        else:
            self.conf.load(b3.getAbsolutePath('@b3/conf/plugin_login.ini'))
        self.p = LoginPlugin(self.console, self.conf)

        self.log.setLevel(logging.DEBUG)
        self.log.info("============================= Login plugin: loading config ============================")
        self.p.onLoadConfig()
        self.log.info("============================= Login plugin: starting  =================================")
        self.p.onStartup()
class LoginTestCase(B3TestCase):
    """ Ease testcases that need an working B3 console and need to control the censor plugin config """

    def setUp(self):
        self.log = logging.getLogger('output')
        self.log.propagate = False

        B3TestCase.setUp(self)

        admin_conf = XmlConfigParser()
        admin_conf.load(ADMIN_CONFIG_FILE)
        self.adminPlugin = AdminPlugin(self.console, admin_conf)
        when(self.console).getPlugin("admin").thenReturn(self.adminPlugin)
        self.adminPlugin.onLoadConfig()
        self.adminPlugin.onStartup()

        self.console.gameName = "theGame"
        self.console.startup()
        self.log.propagate = True


    def tearDown(self):
        B3TestCase.tearDown(self)

    def init_plugin(self, config_content=None):
        self.conf = XmlConfigParser()
        if config_content:
            self.conf.setXml(config_content)
        else:
            self.conf.load(default_plugin_file)
        self.p = LoginPlugin(self.console, self.conf)

        self.log.setLevel(logging.DEBUG)
        self.log.info("============================= Login plugin: loading config ============================")
        self.p.onLoadConfig()
        self.log.info("============================= Login plugin: starting  =================================")
        self.p.onStartup()