def setup_db(self):
     self.db_file_path = T.testdb.create_temp_db_file()
     T.MockedSettings['db_uri'] = T.testdb.get_temp_db_uri(self.db_file_path)
     with patch.dict(db.Settings, T.MockedSettings):
         db.init_db()
         self.insert_checklists()
         yield
         db.finalize_db()
         os.unlink(self.db_file_path)
Beispiel #2
0
 def setup_db(self):
     self.db_file_path = T.testdb.create_temp_db_file()
     T.MockedSettings['db_uri'] = T.testdb.get_temp_db_uri(self.db_file_path)
     with patch.dict(db.Settings, T.MockedSettings):
         db.init_db()
         self.insert_requests()
         yield
         db.finalize_db()
         os.unlink(self.db_file_path)
def main():
    usage = 'usage: %prog <oldtag> <newtag>'
    parser = OptionParser(usage)
    (_, args) = parser.parse_args()

    if len(args) == 2:
        db.init_db()
        convert_checklist(args[0], args[1])
        db.finalize_db()
    else:
        parser.error('Incorrect number of arguments')
def main():
    usage = 'usage: %prog <oldtag> <newtag>'
    parser = OptionParser(usage)
    (_, args) = parser.parse_args()

    if len(args) == 2:
        db.init_db()
        convert_checklist(args[0], args[1])
        db.finalize_db()
    else:
        parser.error('Incorrect number of arguments')
Beispiel #5
0
 def cleanup_db(self):
     db.finalize_db()
     os.unlink(self.db_file)
Beispiel #6
0
 def cleanup_db(self):
     db.finalize_db()
     os.unlink(self.db_file)
Beispiel #7
0
 def cleanup_database(self):
     db.finalize_db()
     os.unlink(self.db_file_path)
Beispiel #8
0
 def cleanup_database(self):
     db.finalize_db()
     os.unlink(self.db_file_path)