Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add a way to configure basic auth without storing passwords in plaintext in settings #2
base: main
Are you sure you want to change the base?
Add a way to configure basic auth without storing passwords in plaintext in settings #2
Changes from all commits
0299d87
c3b1bf2
6b791da
5dab1ec
e11d56f
b38bb79
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prog
needs to be added for unit test change suggestion I'm making below to work.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix failing tests you could call cli.main directly as I've suggested below. Makes for faster tests as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The failure was intentional, so to speak, but honestly I forgot about the pending change I intended to make. It is fixed now.
The problem is not in calling
cli.main
directly or not, but rather in thatadd_subparsers
function only addedrequired=
kwarg in Python 3.7, so I wanted a test suite that would work withrequired=True
in 3.7+ to then mimic the same behaviour (message and exit-code) for 3.6. See my most recent commit.The reasons I went for subprocess approach in the first place are as follows:
prog=
kwargSystemExit
exception to ensure tests continue workingIf it were up to me, I'd probably keep the existing tests as is, and use
cli.main
as soon as there are more unit tests to add. Although if you insist I can change go forcli.main
in this PR as well.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@immerrr Gotcha. Let's drop support for 3.6, it's reached end-of-life. You can include that change in your PR. Or if you'd rather I remove it and you rebase on top of my commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done (and reverted the change that enabled support for py3.6)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @immerrr. Tests are still failing on Windows. And they also fail locally on my Mac OS. Fails to find command
fastapi-security
. I would suggest that you go thecli.main
route.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, will do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same with this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fastapi-security
command is not found when I runpoetry run pytest
. Perhaps callcli.main
directly like you've done intest_gendigest_smoke_test
? E.g: