def __init__(self, db_id=None):
    "pass None as db_id to create a new pgmock database"
    self.closed = False
    self.db_id = add_db() if db_id is None else db_id
    self.db = DATABASES[self.db_id]
    print 'connected db %i' % self.db_id
    self._autocommit = False
    self.transaction_open = False
def __init__ ( self , db_id = None ) : self . closed = False self . db_id = add_db ( ) if db_id is None else db_id self . db = DATABASES [ self . db_id ] print 'connected db %i' % self . db_id self . _autocommit = False self . transaction_open = False
pass None as db_id to create a new pgmock database