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

Convert enable_api_doc_views to bool #218

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DaineDanielson
Copy link

Previously, setting
pyramid_swagger.enable_api_doc_views = false
in a configuration .ini file would not disable the api_doc views,
because the string 'false' is truthy.

Previously, setting
pyramid_swagger.enable_api_doc_views = false
in a configuration .ini file would not disable the api_doc views,
because the string 'false' is truthy.

 - Convert the string-value of
   settings.get('pyramid_swagger.enable_api_doc_views', True)
   to a bool using pyramid.settings.asbool .
   (https://docs.pylonsproject.org/projects/pyramid/en/latest/api/settings.html)
@coveralls
Copy link

coveralls commented Sep 24, 2017

Coverage Status

Coverage remained the same at ?% when pulling 393c4b0 on DaineDanielson:patch-1 into 1dbc0b4 on striglia:master.

@striglia
Copy link
Contributor

Thanks for the fix Daine! This isn't the first bug we've had loading ini files....do you have any idea how we can effective test ini features? I'd love to write a test module for making sure we properly load from file...

@DaineDanielson
Copy link
Author

I don't have a thought of how to do this off the top of my head, but it would definitely be great to find a way to test this in general, for any ini-setting, existing or future. I would need to get a broader view of the pyramid_swagger codebase, which I sadly don't have time to do right now. Thanks for being so responsive on this, @striglia!

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

Successfully merging this pull request may close these issues.

3 participants