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

reconsider app init when testing CLI commands #92

Open
rsyring opened this issue Oct 22, 2017 · 0 comments
Open

reconsider app init when testing CLI commands #92

rsyring opened this issue Oct 22, 2017 · 0 comments

Comments

@rsyring
Copy link
Member

rsyring commented Oct 22, 2017

Currently, testing.invoke_command() sets the environment variable USE_TEST_PROFILE which triggers the use of, wait for it, the testing profile. But, .cli.CLILoader.create_app() inits the app directly and doesn't use Keg.test_prep() which means the app instance is not cached and the testing_run_start signal might not get sent.

It seems like a refactoring of Keg.init() to support the testing_prep() logic might be called for and that logic could be triggered by a keyword arg or environment variable. One caveat though is that when using invoke_command() args might be sent to the app that affect it's instantiation. If they are different, you wouldn't want to return the cached app.

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

1 participant