We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14cd2bf commit 521c13bCopy full SHA for 521c13b
tests/oauth2/test_oauth2.py
@@ -270,3 +270,19 @@ class TestCredentialAuthSQLAlchemy(TestCredentialAuth):
270
271
def create_oauth_provider(self, app):
272
return sqlalchemy_provider(app)
273
+
274
275
+class TestTokenGenerator(OAuthSuite):
276
277
+ def create_oauth_provider(self, app):
278
279
+ def generator(request, refresh_token=False):
280
+ return 'foobar'
281
282
+ app.config['OAUTH2_PROVIDER_TOKEN_GENERATOR'] = generator
283
+ return default_provider(app)
284
285
+ def test_get_access_token(self):
286
+ rv = self.client.post(authorize_url, data={'confirm': 'yes'})
287
+ rv = self.client.get(clean_url(rv.location))
288
+ assert 'foobar' in u(rv.data)
0 commit comments