Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

Commit

Permalink
Merge pull request #300 from andylolz/remove-superfluous-line
Browse files Browse the repository at this point in the history
Remove weird line in create_app that’s just there to make the test suite work; do it The Correct Way™ in the test setUp instead
  • Loading branch information
Imogen Kutz committed Jun 18, 2018
2 parents efdab1f + 0d7ccb6 commit 3941158
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion iati_datastore/iatilib/frontend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def create_app(**config):
'RQ_DEFAULT_PASSWORD': app.config['REDIS_PASSWORD']
})

db.app = app # don't understand why I need to this
db.init_app(app)
redis.init_app(app)

Expand Down
2 changes: 2 additions & 0 deletions iati_datastore/iatilib/test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def setUp(self):
'sqlite:///:memory:',
)
)
_app.app_context().push()

self.app = _app
if os.environ.get("SA_ECHO", "False") == "True":
db.engine.echo = True
Expand Down

0 comments on commit 3941158

Please sign in to comment.