diff --git a/tests/autocomplete/test_base.py b/tests/autocomplete/test_base.py index 1d74c90f74282031af16a6185392265111161a2a..258ee6c2b70e5ab70286d24f00c55a4ce5186d71 100644 --- a/tests/autocomplete/test_base.py +++ b/tests/autocomplete/test_base.py @@ -13,6 +13,7 @@ class TestAutocompleter(TestCase): def setUp(self): self.config = self.make_config() + self.app = self.config.get_app() def make_config(self): return make_config([], extend=False) @@ -32,7 +33,7 @@ class TestAutocompleter(TestCase): def test_get_model_class(self): try: - model = self.config.get_model() + model = self.app.model except ImportError: pytest.skip("test is not relevant without sqlalchemy") @@ -73,7 +74,7 @@ class TestAutocompleter(TestCase): pytest.skip("test is not relevant without sqlalchemy") engine = sa.create_engine('sqlite://') - model = self.config.get_model() + model = self.app.model model.Base.metadata.create_all(bind=engine) session = Session(bind=engine) @@ -132,6 +133,7 @@ class TestPhoneMagicMixin(TestCase): def setUp(self): self.config = self.make_config() + self.app = self.config.get_app() def make_config(self): return make_config([], extend=False) @@ -143,7 +145,7 @@ class TestPhoneMagicMixin(TestCase): pytest.skip("test is not relevant without sqlalchemy") engine = sa.create_engine('sqlite://') - model = self.config.get_model() + model = self.app.model model.Base.metadata.create_all(bind=engine) session = Session(bind=engine)