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

Commit

Permalink
Merge pull request #313 from dhermes/flask-test-add-pragma
Browse files Browse the repository at this point in the history
Call two() method in flask util test.
  • Loading branch information
nathanielmanistaatgoogle committed Sep 22, 2015
2 parents a439a19 + 085227a commit c412da9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_flask_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,15 @@ def two():
self.assertTrue('include_granted_scopes' in q)
self.assertEqual(q['scope'][0], 'email one two three')

# Actually call two() without a redirect.
credentials2 = self._generate_credentials(scopes=['two', 'three'])
with self.app.test_client() as c:
with c.session_transaction() as session:
session['google_oauth2_credentials'] = credentials2.to_json()

rv = c.get('/two')
self.assertEqual(rv.status_code, httplib.OK)

def test_refresh(self):
with self.app.test_request_context():
with mock.patch('flask.session'):
Expand Down

0 comments on commit c412da9

Please sign in to comment.