Exemple #1
0
def client():
    db_fd, app.app.config['DATABASE'] = tempfile.mkstemp()
    app.app.config['TESTING'] = True

    with app.app.test_client() as client:
        with app.app.app_context():
            app.init_db()
        yield client

    os.close(db_fd)
    os.unlink(app.app.config['DATABASE'])
Exemple #2
0
 def setUp(self):
     """Set up a blank temp database before each test"""
     self.db_fd, app.app.config['DATABASE'] = tempfile.mkstemp()
     app.app.config['TESTING'] = True
     self.app = app.app.test_client()
     app.init_db()
Exemple #3
0
from app.app import app, init_db
from app.constantes import DEBUG

if __name__ == "__main__":
    init_db()
    # app.run(debug=DEBUG)
Exemple #4
0
from app.app import Kanban_app, init_db

if __name__ == '__main__':
    init_db()  # initialise database
    Kanban_app.run(port=5000, host='localhost', debug=True)
Exemple #5
0
 def setUp(self):
     self.db_fd, run.app.config['DATABASE'] = tempfile.mkstemp()
     run.app.config['TESTING'] = True
     self.app = run.app.test_client()
     app.init_db()
Exemple #6
0
 def setUp(self):
     self.db_fd, app.config['DATABASE'] = tempfile.mkstemp()
     app.config['TESTING'] = True
     self.app = app.test_client()
     with app.app_context():
         app.init_db()
Exemple #7
0
 def setUp(self):
     """Set up a blank temp db before each test"""
     self.db_fd, app.app.config['DATABASE'] = tempfile.mkstemp()
     app.app.config['TESTING'] = True
     self.app = app.app.test_client()
     app.init_db()