Exemplo n.º 1
0
 def tearDown(self):
     with io.StringIO() as out:
         self.db.raw_db.dump(out)
         print "Table is: \n" + out.getvalue()
     self.db.drop_table()
     self.connection.close()
     AssertDB.tearDown(self)
Exemplo n.º 2
0
 def setUp(self):
     AssertDB.setUp(self)
     self.connection = sqlite3.connect(':memory:')
     cursor = self.connection.cursor()
     # Enables foreign_keys support in sqlite
     cursor.execute("PRAGMA foreign_keys = ON")
     self.connection.commit()
     # See the assert at the beginning of this module:
     # sqlite3.paramstyle == 'qmark'
     # This means the module uses '?'  as the SQL parameter format.
     self.db = SequencerSQLDB(SQLiteDB('memory', self.connection))
     self.db.create_table()
Exemplo n.º 3
0
    def tearDown(self):
#        self.db.drop_table()
        AssertDB.tearDown(self)
Exemplo n.º 4
0
 def setUp(self):
     AssertDB.setUp(self)
     self.basedir = tempfile.mkdtemp(suffix='tmp', prefix='testfiledb')
     self.db = SequencerFileDB(self.basedir)
     self.db.create_table()