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
fix nzbget test #1899
fix nzbget test #1899
Conversation
if use_https == 'false': | ||
use_https = False | ||
else: | ||
use_https = True |
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.
use_https = bool(use_https) didn't work?
if use_https == 'false': | ||
use_https = False | ||
else: | ||
use_https = True | ||
connected_status = nzbget.testNZB(host, username, password, use_https) |
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.
or put it here?
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 current values are 'on' 'off', they're now 'true' 'false'. Python sees all 4 values as truthy values and sets it as true. 😞
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.
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.
So you could do:
connected_status = nzbget.testNZB(host, username, password, config.checkbox_to_value(use_https))
checkbox_to_value works on: 'on', 'off', 'true', 'false'. It doesn't work on True, False
f9746b2
to
2acb4e8
Compare
This fixes nzbget using https at all times in the test.
We need the True/False section as current values are stored as on/off so next time the user runs this it'll fix it all up.