示例#1
0
    def test_SqliteDb(self):
        """ Test the SqliteDb class that is used by the sqlite mappers. """
        from pyworkflow.mapper.sqlite_db import SqliteDb

        db = SqliteDb()
        db._createConnection(self.modelGoldSqlite, timeout=1000)

        tables = ["Objects", "Relations"]
        self.assertEqual(tables, db.getTables())

        db.close()
示例#2
0
 def test_SqliteDb(self):
     """ Test the SqliteDb class that is used by the sqlite mappers. """
     db = SqliteDb()
     db._createConnection(self.modelGoldSqlite, timeout=1000)
     
     tables = ['Objects', 'Relations']
     self.assertEqual(tables, db.getTables())
     
     # Test getting the version, for the gold file it should be 0
     self.assertEqual(0, db.getVersion())
     
     db.close()
示例#3
0
    def test_SqliteDb(self):
        """ Test the SqliteDb class that is used by the sqlite mappers. """
        db = SqliteDb()
        db._createConnection(self.modelGoldSqlite, timeout=1000)

        tables = ['Objects', 'Relations']
        self.assertEqual(tables, db.getTables())

        # Test getting the version, for the gold file it should be 0
        self.assertEqual(0, db.getVersion())

        db.close()