add integration
This commit is contained in:
@@ -2,19 +2,26 @@ from http import HTTPMethod
|
||||
|
||||
from layercake.dynamodb import DynamoDBPersistenceLayer
|
||||
|
||||
from jose_ import generate_jwt
|
||||
|
||||
from ..conftest import HttpApiProxy, LambdaContext
|
||||
|
||||
|
||||
def test_authorize(
|
||||
mock_app,
|
||||
dynamodb_seeds,
|
||||
app,
|
||||
seeds,
|
||||
dynamodb_persistence_layer: DynamoDBPersistenceLayer,
|
||||
http_api_proxy: HttpApiProxy,
|
||||
lambda_context: LambdaContext,
|
||||
):
|
||||
client_id = 'd72d4005-1fa7-4430-9754-80d5e2487bb6'
|
||||
|
||||
r = mock_app.lambda_handler(
|
||||
id_token = generate_jwt(
|
||||
user_id='357db1c5-7442-4075-98a3-fbe5c938a419',
|
||||
email='sergio@somosbeta.com.br',
|
||||
)
|
||||
|
||||
r = app.lambda_handler(
|
||||
http_api_proxy(
|
||||
raw_path='/authorize',
|
||||
method=HTTPMethod.GET,
|
||||
@@ -25,6 +32,9 @@ def test_authorize(
|
||||
'scope': 'openid',
|
||||
'nonce': '123',
|
||||
},
|
||||
cookies=[
|
||||
f'id_token={id_token}; HttpOnly; Secure',
|
||||
],
|
||||
),
|
||||
lambda_context,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user