示例#1
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="spelling")
     self._classname = None
     self._corpus = None
     self._alphabet = None
     self._check_before = False
     self._check_and_retry = False
示例#2
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="conversations")
     self._max_histories = 100
     self._restore_last_topic = False
     self._initial_topic = "*"
     self._type = None
     self._storage = None
     self._empty_on_start = False
示例#3
0
 def __init__(self, config_name):
     BaseConfigurationData.__init__(self, name=config_name)
     self._host = "localhost"
     self._port = 27017
     self._password = None
     self._root = None
     self._name = None
     self._collection_name = None
示例#4
0
    def __init__(self):
        BaseConfigurationData.__init__(self, name="scheduler")
        self._name = None
        self._debug_level = 0
        self._add_listeners = False
        self._remove_all_jobs = False
        self._blocking = False

        self._jobstore = None
        self._threadpool = None
        self._processpool = None
        self._job_defaults = None
示例#5
0
    def test_additionals(self):
        config = BaseConfigurationData("test")

        self.assertEqual([], config.additionals_to_add())

        config._additionals["key1"] = "value1"
        config._additionals["key2"] = "value2"

        self.assertTrue(config.exists("key1"))
        self.assertEqual("value1", config.value("key1"))

        self.assertTrue(config.exists("key2"))
        self.assertEqual("value2", config.value("key2"))

        self.assertFalse(config.exists("key3"))
示例#6
0
    def test_sub_bot_root(self):
        config = BaseConfigurationData("test")

        replaced = config.sub_bot_root(os.sep + "data", os.sep + "root")
        self.assertIsNotNone(replaced)
        self.assertEqual(replaced, os.sep + "data")

        replaced = config.sub_bot_root("$BOT_ROOT" + os.sep + "data",
                                       os.sep + "root")
        self.assertIsNotNone(replaced)
        self.assertEqual(replaced, os.sep + "root" + os.sep + "data")

        replaced = config.sub_bot_root("$BOT_ROOT$BOT_ROOT" + os.sep + "data",
                                       os.sep + "root")
        self.assertIsNotNone(replaced)
        self.assertEqual(replaced,
                         os.sep + "root" + os.sep + "root" + os.sep + "data")
示例#7
0
 def __init__(self, config_name):
     BaseConfigurationData.__init__(self, name=config_name)
     self._dir = None
示例#8
0
 def __init__(self, config_name):
     BaseConfigurationData.__init__(self, name=config_name)
     self._host = "localhost"
     self._port = 6379
     self._password = None
     self._prefix = None
示例#9
0
 def __init__(self, name):
     BaseConfigurationData.__init__(self, name)
示例#10
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="jobstore")
     self._name = None
     self._jobstore = None
示例#11
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="mongo")
     self._collection = None
示例#12
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="job_defaults")
     self._coalesce = None
     self._max_instances = None
示例#13
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="processpool")
     self._max_workers = None
示例#14
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="sqlalchemy")
     self._url = None
示例#15
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="session")
     self._session_saving_mode = None
     self._session_saving_dir = None
示例#16
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="redis")
     self._jobs_key = None
     self._run_times_key = None
示例#17
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "test")