Skip to content

Commit

Permalink
Fix the Flask demo app
Browse files Browse the repository at this point in the history
  • Loading branch information
kingbuzzman authored and francoisfreitag committed Oct 27, 2022
1 parent f094658 commit f4e3535
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/flask_alchemy/test_demoapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@ class DemoAppTestCase(unittest.TestCase):
def setUp(self):
demoapp.app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite://'
demoapp.app.config['TESTING'] = True

self.app_context = demoapp.app.app_context()
self.app_context.push()

self.app = demoapp.app.test_client()
self.db = demoapp.db
self.db.create_all()

def tearDown(self):
self.db.drop_all()
self.app_context.pop()

def test_user_factory(self):
user = demoapp_factories.UserFactory()
Expand Down

0 comments on commit f4e3535

Please sign in to comment.