-
Notifications
You must be signed in to change notification settings - Fork 63
Make webapp2_extras/appengine/auth/models.User.validate_token return … #109
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
Current coverage is
|
@@ -141,14 +141,14 @@ def test_user_token(self): | |||
auth_id = 'foo' | |||
|
|||
token = m.create_auth_token(auth_id) | |||
self.assertTrue(m.validate_auth_token(auth_id, token)) | |||
self.assertTrue(m.validate_auth_token(auth_id, token) != None) |
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.
assertNotNone
?
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.
Fixed.
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.
Have you pushed? I'm not seeing your updates.
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.
Sorry - I screwed up amending the commit. Should be there now.
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.
I'm seeing some of the assertNone
but not the assertIsNotNone
s.
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.
On Apr 11, 2016, at 2:59 PM, Jon Wayne Parrott notifications@github.com wrote:
In tests/extras_appengine_auth_models_test.py #109 (comment):
@@ -141,14 +141,14 @@ def test_user_token(self):
auth_id = 'foo'token = m.create_auth_token(auth_id)
self.assertTrue(m.validate_auth_token(auth_id, token))
I'm seeing some of the assertNone but not the assertIsNotNones.self.assertTrue(m.validate_auth_token(auth_id, token) != None)
Yeah - well, that’s because I didn’t change them :/ And it’s assertIsNone.
Here’s hoping that everything is right this time and I can stop embarrassing myself with this trivial change :)
I signed it! |
20e104c
to
3913586
Compare
CLAs look good, thanks! |
…UserToken or None. Make the implementation of webapp2_extras/appengine/auth/models.User.validate_token match the documentation and return the UserToken instead of Bool. Also correct the unit tests. This fixes issue GoogleCloudPlatform#102.
Thanks, @karlwmacmillan! |
…UserToken or None.
Make the implementation of webapp2_extras/appengine/auth/models.User.validate_token match
the documentation and return the UserToken instead of Bool. Also correct the unit tests.
This fixes issue #102.