import app.events.daily_sync_course_metadata as app
from aws_lambda_powertools.utilities.typing import LambdaContext
from layercake.dynamodb import DynamoDBPersistenceLayer, KeyPair


def test_daily_sync_course_metadata(
    dynamodb_client,
    dynamodb_seeds,
    dynamodb_persistence_layer: DynamoDBPersistenceLayer,
    lambda_context: LambdaContext,
):
    app.lambda_handler({}, lambda_context)  # type: ignore

    collection = dynamodb_persistence_layer.collection
    item = collection.get_item(KeyPair('a810dd22-56c0-4d9b-8cd2-7e2ee9c45839', '0'))

    print(item)

    assert item
