예제 #1
0
    def setUp(self):
        import db
        from datatable import DataTable

        self.db = db.getInstance()
        self.datatable = DataTable(self.db, 'disciplines')
예제 #2
0
 def setUp(self):
     import db
     self.db = db.getInstance()
예제 #3
0
# This test relies on a conf file that sets
# 
# database.engine = 'mssql'

import conf
import db

conf_ = conf.getInstance()
db_ = db.getInstance()
engine = conf_['database']['engine']
print engine
if engine == 'mysql':
    r = db_.query('SELECT * FROM customers limit 1')
else:
    r = db_.query('SELECT top(1) * FROM address')
print r