Пример #1
0
    def setUp(self):
        with app.app_context():
            db.create_all()

        self.storage_app = app.test_client()
        # This is useful for knowing about the available methods.
        self.storage_app.url_map = app.url_map
Пример #2
0
    def setUp(self):
        app.config['TESTING'] = True
        app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:'
        self.storage_app = app.test_client()
        # This is useful for knowing about the available methods.
        self.storage_app.url_map = app.url_map

        with app.app_context():
            db.create_all()
Пример #3
0
    def setUp(self):
        app.config['TESTING'] = True
        app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:'
        self.storage_app = app.test_client()
        # This is useful for knowing about the available methods.
        self.storage_app.url_map = app.url_map

        with app.app_context():
            db.create_all()
Пример #4
0
 def tearDown(self):
     with app.app_context():
         db.session.remove()
         db.drop_all()
Пример #5
0
 def tearDown(self):
     with app.app_context():
         db.session.remove()
         db.drop_all()