Example #1
0
 def setUp(self):
     prepare_database()
     app.config['SQLALCHEMY_DATABASE_URI'] = (
         'postgresql+psycopg2://%(username)s:%(password)s@%(host)s:%(port)s/%(dbname)s' %
         DATABASE_CONFIG)
     app.config['TESTING'] = True
     db.init_app(app)
     db.create_all()
     self.app = app.test_client()
Example #2
0
    def run(self):
        from mycouch import db

        db.drop_all()
        db.create_all()
        db.session.commit()