예제 #1
0
 def setUp(self):
     JNTTServer.setUp(self)
     options = JNTOptions({'conf_file':self.getDataFile(self.server_conf)})
     options.load()
     self.dbengine = create_db_engine(options)
     self.dbmaker = sessionmaker()
     # Bind the sessionmaker to engine
     self.dbmaker.configure(bind=self.dbengine)
     self.dbsession = scoped_session(self.dbmaker)
     Base.metadata.drop_all(bind=self.dbengine)
예제 #2
0
 def tearDown(self):
     if self.dbsession is not None:
         self.dbsession.commit()
         self.dbsession.close()
         self.dbsession = None
     if self.dbmaker is not None:
         self.dbmaker.close_all()
         self.dbmaker = None
     if self.dbengine is not None:
         self.dbengine.dispose()
         self.dbengine = None
     JNTTServer.tearDown(self)
예제 #3
0
 def tearDown(self):
     self.stopClient()
     JNTTServer.tearDown(self)
예제 #4
0
 def setUp(self):
     JNTTServer.setUp(self)
     self.startClient(self.conf)