Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid passing around sdc_home and instead pass a session maker #296

Closed
heartsucker opened this issue Apr 9, 2019 · 1 comment
Closed

Comments

@heartsucker
Copy link
Contributor

We have these lines in our code 3 times

engine = make_engine(sdc_home)
Session = sessionmaker(bind=engine)
session = Session()

For simplicity, we may want to pass the Session around instead. This will also reduce the need to mock as heavily in tests.

@redshiftzero redshiftzero changed the title avoid passing around gpg_home and instead pass a session maker avoid passing around sdc_home and instead pass a session maker May 28, 2019
@redshiftzero
Copy link
Contributor

This is done in https://github.com/freedomofpress/securedrop-client/compare/refactor-session for very closely related ticket #382. Closing this ticket in favor of #382 so that we can track progress in one place

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants