fix slots
This commit is contained in:
@@ -9,7 +9,7 @@ def test_reminder_no_access_3_days(
|
||||
):
|
||||
event = {
|
||||
'detail': {
|
||||
'new_image': {
|
||||
'old_image': {
|
||||
'id': '47ZxxcVBjvhDS5TE98tpfQ',
|
||||
'sk': 'schedules#reminder_no_access_3_days',
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import pprint
|
||||
|
||||
import app.events.stopgap.enroll as app
|
||||
from aws_lambda_powertools.utilities.typing import LambdaContext
|
||||
from layercake.dynamodb import (
|
||||
@@ -37,4 +35,5 @@ def test_enroll(
|
||||
+ SortKey('metadata#course')
|
||||
)
|
||||
|
||||
pprint.pprint(result)
|
||||
assert 'metadata#course' in result
|
||||
assert 'metadata#deduplication_window' in result
|
||||
|
||||
26
enrollments-events/tests/events/test_allocate_slots.py
Normal file
26
enrollments-events/tests/events/test_allocate_slots.py
Normal file
@@ -0,0 +1,26 @@
|
||||
import app.events.allocate_slots as app
|
||||
from aws_lambda_powertools.utilities.typing import LambdaContext
|
||||
from layercake.dynamodb import DynamoDBPersistenceLayer, PartitionKey
|
||||
|
||||
|
||||
def test_allocate_slots(
|
||||
dynamodb_seeds,
|
||||
dynamodb_client,
|
||||
dynamodb_persistence_layer: DynamoDBPersistenceLayer,
|
||||
lambda_context: LambdaContext,
|
||||
):
|
||||
event = {
|
||||
'detail': {
|
||||
'new_image': {
|
||||
'id': 'JeCybf6oiv6CF3PchhBqdG',
|
||||
'sk': 'generated_items',
|
||||
}
|
||||
}
|
||||
}
|
||||
assert app.lambda_handler(event, lambda_context) # type: ignore
|
||||
|
||||
result = dynamodb_persistence_layer.collection.query(
|
||||
PartitionKey('vacancies#PWQyjGZeVcoD5zc5eTkvpr')
|
||||
)
|
||||
|
||||
assert len(result['items']) == 4
|
||||
Reference in New Issue
Block a user