Closed dainnilsson closed 11 years ago
It would also be nice to add a test case for this functionality.
Besides this and a couple of other minor things I have mentioned, the change looks good to me. Thanks.
Initially I was weary of adding any changes that may break backwards-compatibility, but since you're ok with the the change in general I'll look over the comments and send an updated pull request in response to your comments!
There, I've added a check to ensure that the URLs are a list or tuple. I also added support for a string in case there is only a single server. It seemed to make more sense to only generate the URL list once now, so I've replaced generate_request_urls with _init_request_urls, which is run during construction, and the use_https flag is discarded afterwards. I've also added a TestCase for the new behavior.
Thanks :)
I've fixed the pep8 issue and merged your pull request into master. I will publish new version with this change to PyPi soon.
I noticed that the only way to specify validation server URLs was a rather ugly way of overwriting the constant where they are stored. This pull request adds an optional parameter, api_urls, which can be passed to Yubico to set the API URLs used by that instance.