Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Make webapp2_extras/appengine/auth/models.User.validate_token return … #109

Merged
merged 1 commit into from
Apr 11, 2016

Conversation

karlwmacmillan
Copy link
Contributor

…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.

@googlebot
Copy link

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. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@codecov-io
Copy link

Current coverage is 95.80%

Merging #109 into master will not affect coverage as of 442b167

@@            master   #109   diff @@
=====================================
  Files           23     23       
  Stmts         1884   1884       
  Branches       286    286       
  Methods          0      0       
=====================================
  Hit           1805   1805       
  Partial         58     58       
  Missed          21     21       

Review entire Coverage Diff as of 442b167

Powered by Codecov. Updated on successful CI builds.

@@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assertNotNone?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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 assertIsNotNones.

Copy link
Contributor Author

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))
    
  •    self.assertTrue(m.validate_auth_token(auth_id, token) != None)
    
    I'm seeing some of the assertNone but not the assertIsNotNones.

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 :)

@karlwmacmillan
Copy link
Contributor Author

I signed it!

@karlwmacmillan karlwmacmillan force-pushed the master branch 2 times, most recently from 20e104c to 3913586 Compare April 11, 2016 18:34
@googlebot
Copy link

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.
@theacodes
Copy link
Contributor

Thanks, @karlwmacmillan!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants