Esempio n. 1
0
    def setUp(self):
        super(LayersTest, self).setUp()

        db.engine = self.engine
        db.session = scoped_session(sessionmaker(bind=self.connection))
        db.init_db()

        self.project_dir = tempfile.mkdtemp(prefix="lt.")

        gr.app.config['TESTING'] = True
        self.app = gr.app.test_client()
        self.base_path = '/projects'
Esempio n. 2
0
 def refresh_db(clz, bind=None):
     db.clear_db(bind=bind)
     db.init_db(bind=bind)
Esempio n. 3
0
 def init_db():
     db.clear_db()
     db.init_db()