-
Notifications
You must be signed in to change notification settings - Fork 888
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 timeout argument to int values when applicable #2050
Conversation
@RaHus as an aside, I recently added contributing.md, which appears when creating a new issue on GitHub. It's intended for new contributors to Pyramid.
Thanks. |
@stevepiercy yeah i did notice it and it did include helpful information, thanks :) |
Can I convince you to fix Have you investigated whether this is also an issue with the other parameters (reissue_time and max_age)? [1] https://github.com/Pylons/pyramid/blob/master/pyramid/authentication.py#L858 |
@mmerickel Sure you can, i am glad i can help :). It looks like Next chance i get i'll investigate further and include the changes in this PR if needed. |
|
@RaHus I'd appreciate it very much, thank you. As @bertjwregeer said, |
- add Git Branches per https://github.com/Pylons/pyramid/pull/2050#is…
- add Git Branches per https://github.com/Pylons/pyramid/pull/2050#is…
- add Git Branches per https://github.com/Pylons/pyramid/pull/2050#is…
@mmerickel |
TravisCI fails due to missing ordereddict in python2.6 which is required by WebTest. see #2071 |
The failure is due to a WebTest packaging bug. |
The wheel is gone: I restated the failed 2.6 test, and it passed. |
I think i have included all the items that where discussed here. Any comments on the PR so far or any other item/changes/corrections i should consider? I would love to finalize this and pick another issue to work on. |
@@ -758,6 +767,12 @@ def test_identify_cookie_timed_out(self): | |||
result = helper.identify(request) | |||
self.assertEqual(result, None) | |||
|
|||
def test_identify_cookie_str_timeout(self): |
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.
How does this test the timeout of the cookie? A bogus auth_tkt
is already invalid and will always "timeout".
The rationale was to make sure it would behave the same with a valid str and int mostly due to me being unfamiliar with the code, but i see how this is needless. Prior to that i was just doing: def test_init_cookie_str_timeout(self):
helper = self._makeOne('secret', timeout='1')
self.assertTrue(helper.timeout == 1) I followed the same rationale for other valid string parameter tests which i will change once someone confirms that the above (just check that the conversion to int is done) is enough |
Yes, what you put down is enough. If you make that change I'll be happy to +1 it. |
Supersedes: #2050 int conversion checks
In response to #1656.
Reapplied the changes on top of master.