Exemplo n.º 1
0
    def setUp(self):
        # Make sure database exists

        with app.app_context():
            db.create_all()
        # Get a test client
        self.app = app.test_client
        self.app_context = app.app_context
Exemplo n.º 2
0
    def setUp(self):

        with app.app_context():

            db.create_all()

        self.app = app.test_client
        self.app_context = app.app_context
    def setUp(self):
        # Make sure database exists - executes for each test method

        with app.app_context():
            db.create_all()

        # Get a new test client for each test
        self.app = app.test_client()
        self.app_context = app.app_context
Exemplo n.º 4
0
 def setUp(self):
     # Make sure database exists
     app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///'
     with app.app_context():
         db.init_app(app)
         db.create_all()
     # Get a test client
     self.app = app.test_client()
     self.app_context = app.app_context
Exemplo n.º 5
0
def create_tables():
    db.create_all()