Esempio n. 1
0
 def initTask(self):
     super(AtcdDBQueueTask, self).initTask()
     try:
         self.sqlite_manager = SQLiteManager(self.sqlite_file, self.logger)
     except OperationalError:
         self.logger.exception(
             'Unable to initialize DB from file "{0}"'.format(
                 self.sqlite_file))
         raise
Esempio n. 2
0
 def test_sqlite_file_not_found(self):
     with pytest.raises(sqlite3.OperationalError):
         SQLiteManager('/this/path/should/not/exist')
Esempio n. 3
0
def dbm(atc_db_file):
    return SQLiteManager(atc_db_file.name)