def __init__(self): ClientConfigurationData.__init__(self, "socket") self._host = "0.0.0.0" self._port = 80 self._debug = False self._queue = 5 self._max_buffer = 1024
def test_with_data(self): yaml = YamlConfigurationFile() self.assertIsNotNone(yaml) yaml.load_from_text(""" console: bot: bot prompt: ">>>" license_keys: $BOT_ROOT/config/license.keys bot_selector: programy.clients.client.DefaultBotSelector renderer: programy.clients.render.text.TextRenderer scheduler: name: Scheduler1 debug_level: 0 add_listeners: True remove_all_jobs: True """, ConsoleConfiguration(), ".") bot_config = yaml.get_section("console") client_config = ClientConfigurationData("test") client_config.load_configuration(yaml, bot_config, ".") self.assertEquals("./config/license.keys", client_config.license_keys) self.assertEquals("programy.clients.client.DefaultBotSelector", client_config.bot_selector) self.assertIsNotNone(client_config.scheduler) self.assertEquals("Scheduler1", client_config.scheduler.name) self.assertEquals(0, client_config.scheduler.debug_level) self.assertTrue(client_config.scheduler.add_listeners) self.assertTrue(client_config.scheduler.remove_all_jobs) self.assertEquals("programy.clients.render.text.TextRenderer", client_config.renderer)
def test_with_data(self): yaml = YamlConfigurationFile() self.assertIsNotNone(yaml) yaml.load_from_text( """ console: bot: bot prompt: ">>>" bot_selector: programy.clients.client.DefaultBotSelector renderer: programy.clients.render.text.TextRenderer scheduler: name: Scheduler1 debug_level: 0 add_listeners: True remove_all_jobs: True """, ConsoleConfiguration(), ".") bot_config = yaml.get_section("console") client_config = ClientConfigurationData("test") client_config.load_configuration(yaml, bot_config, ".") self.assertEqual("programy.clients.client.DefaultBotSelector", client_config.bot_selector) self.assertIsNotNone(client_config.scheduler) self.assertEqual("Scheduler1", client_config.scheduler.name) self.assertEqual(0, client_config.scheduler.debug_level) self.assertTrue(client_config.scheduler.add_listeners) self.assertTrue(client_config.scheduler.remove_all_jobs) self.assertEqual("programy.clients.render.text.TextRenderer", client_config.renderer)
def __init__(self): ClientConfigurationData.__init__(self, "xmpp") self._server = None self._port = 5222 self._xep_0030 = False self._xep_0004 = False self._xep_0060 = False self._xep_0199 = False
def __init__(self): ClientConfigurationData.__init__(self, "twitter") self._description = 'ProgramY AIML2.0 Twitter Client' self._polling_interval = 0 self._rate_limit_sleep = -1 self._use_status = False self._use_direct_message = False self._auto_follow = False self._welcome_message = "Thanks for following me."
def __init__(self, name): ClientConfigurationData.__init__(self, name) self._host = "0.0.0.0" self._port = 80 self._debug = False self._use_api_keys = False self._api_key_file = None self._ssl_cert_file = None self._ssl_key_file = None
def __init__(self): ClientConfigurationData.__init__(self, "twitter") self._polling_interval = 0 self._rate_limit_sleep = -1 self._use_status = False self._use_direct_message = False self._auto_follow = False self._storage = None self._storage_location = None self._welcome_message = "Thanks for following me."
def test_without_data(self): yaml = YamlConfigurationFile() self.assertIsNotNone(yaml) yaml.load_from_text(""" console: """, ConsoleConfiguration(), ".") bot_config = yaml.get_section("console") client_config = ClientConfigurationData("test") client_config.load_configuration(yaml, bot_config, ".") self.assertIsNone(client_config.license_keys)
def test_with_data(self): yaml = YamlConfigurationFile() self.assertIsNotNone(yaml) yaml.load_from_text(""" console: bot: bot prompt: ">>>" license_keys: $BOT_ROOT/config/license.keys """, ConsoleConfiguration(), ".") bot_config = yaml.get_section("console") client_config = ClientConfigurationData("test") client_config.load_configuration(yaml, bot_config, ".") self.assertEquals("./config/license.keys", client_config.license_keys)
def test_without_data(self): yaml = YamlConfigurationFile() self.assertIsNotNone(yaml) yaml.load_from_text(""" console: """, ConsoleConfiguration(), ".") bot_config = yaml.get_section("console") client_config = ClientConfigurationData("test") client_config.load_configuration(yaml, bot_config, ".") self.assertIsNone(client_config.bot_selector) self.assertIsNotNone(client_config.scheduler) self.assertEqual(None, client_config.scheduler.name) self.assertEqual(0, client_config.scheduler.debug_level) self.assertFalse(client_config.scheduler.add_listeners) self.assertFalse(client_config.scheduler.remove_all_jobs) self.assertIsNone(client_config.renderer)
def test_without_data(self): yaml = YamlConfigurationFile() self.assertIsNotNone(yaml) yaml.load_from_text(""" console: """, ConsoleConfiguration(), ".") bot_config = yaml.get_section("console") client_config = ClientConfigurationData("test") client_config.load_configuration(yaml, bot_config, ".") self.assertIsNone(client_config.license_keys) self.assertIsNone(client_config.bot_selector) self.assertIsNotNone(client_config.scheduler) self.assertEquals(None, client_config.scheduler.name) self.assertEquals(0, client_config.scheduler.debug_level) self.assertFalse(client_config.scheduler.add_listeners) self.assertFalse(client_config.scheduler.remove_all_jobs) self.assertIsNone(client_config.renderer)
def __init__(self): ClientConfigurationData.__init__(self, "telegram") self._unknown_command = None self._unknown_command_srai = None
def __init__(self): ClientConfigurationData.__init__(self, "slack") self._polling_interval = 1
def get_client_configuration(self): return ClientConfigurationData("events")
def get_client_configuration(self): return ClientConfigurationData("polling")
def __init__(self): ClientConfigurationData.__init__(self, "console")
def __init__(self): ClientConfigurationData.__init__(self, "webwebsocket") self._host = "0.0.0.0" self._port = 80
def __init__(self): ClientConfigurationData.__init__(self, "console") self._default_userid = "console" self._prompt = ">>>"