示例#1
0
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
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
def load_grant(client_id, code):  # pragma: no cover
    return OAuthGrant.get(client_id, code)
示例#4
0
def load_grant(client_id, code):  # pragma: no cover
    return OAuthGrant.get(client_id, code)