コード例 #1
0
ファイル: web.py プロジェクト: codesprinters/twillmanager
    def configure(self, cfg):
        """ Configuration and initialization is delayed to allow working
            with CherryPy configuration API
        """
        self.config = cfg
        create_tables(get_db_connection(self.config))

        self.worker_set = WorkerSet(cfg)
        for w in Watch.load_all(get_db_connection(self.config)):
            self.worker_set.add(w.id)
コード例 #2
0
 def setUp(self):
     self.connection = create_db_connection({'sqlite.file':':memory:'})
     create_tables(self.connection)