コード例 #1
0
ファイル: tokens_test.py プロジェクト: bkolobara/indico
def test_grant_get(mocker):
    mocker.patch.object(OAuthGrant, '_cache')
    client_id = str(uuid4())
    code = 'foobar'
    OAuthGrant.get(client_id, code)
    key = OAuthGrant.make_key(client_id, code)
    OAuthGrant._cache.get.assert_called_with(key)
コード例 #2
0
ファイル: tokens_test.py プロジェクト: vireshbackup/indico
def test_grant_get(mocker):
    mocker.patch.object(OAuthGrant, '_cache')
    client_id = str(uuid4())
    code = 'foobar'
    OAuthGrant.get(client_id, code)
    key = OAuthGrant.make_key(client_id, code)
    OAuthGrant._cache.get.assert_called_with(key)
コード例 #3
0
ファイル: provider.py プロジェクト: imfht/flaskapps
def load_grant(client_id, code):  # pragma: no cover
    return OAuthGrant.get(client_id, code)
コード例 #4
0
ファイル: provider.py プロジェクト: jacquesd/indico
def load_grant(client_id, code):  # pragma: no cover
    return OAuthGrant.get(client_id, code)