add middleware
This commit is contained in:
@@ -5,9 +5,12 @@ from layercake.dynamodb import ComposeKey, DynamoDBCollection, PartitionKey
|
||||
|
||||
from ..conftest import HttpApiProxy, LambdaContext
|
||||
|
||||
YEAR_DAYS = 365
|
||||
|
||||
|
||||
def test_post_course(
|
||||
mock_app,
|
||||
dynamodb_seeds,
|
||||
dynamodb_persistence_layer,
|
||||
http_api_proxy: HttpApiProxy,
|
||||
lambda_context: LambdaContext,
|
||||
@@ -19,9 +22,9 @@ def test_post_course(
|
||||
headers={'X-Tenant': '*'},
|
||||
body={
|
||||
'name': 'pytest',
|
||||
'access_period': 365,
|
||||
'access_period': YEAR_DAYS,
|
||||
'cert': {
|
||||
'exp_interval': 730, # 2 years
|
||||
'exp_interval': YEAR_DAYS * 2,
|
||||
},
|
||||
},
|
||||
),
|
||||
@@ -35,6 +38,6 @@ def test_post_course(
|
||||
|
||||
collect = DynamoDBCollection(dynamodb_persistence_layer)
|
||||
logs = collect.get_items(
|
||||
PartitionKey(ComposeKey('5OxmMjL-ujoR5IMGegQz', prefix='logs'))
|
||||
PartitionKey(ComposeKey('5OxmMjL-ujoR5IMGegQz', prefix='log', delimiter=':'))
|
||||
)
|
||||
print(logs)
|
||||
|
||||
Reference in New Issue
Block a user