import app.events.set_as_expired as app


def test_set_as_expired(dynamodb_seeds, lambda_context):
    event = {
        'detail': {
            'new_image': {
                'id': '9omWNKymwU5U4aeun6mWzZ',
                'sk': 'schedules#set_as_expired',
            },
        }
    }
    assert app.lambda_handler(event, lambda_context)


def test_set_as_expired_failed(dynamodb_seeds, lambda_context):
    event = {
        'detail': {
            'new_image': {
                'id': '18f934d8-035a-4ebc-9f8b-6c84782b8c73',
                'sk': 'schedules#set_as_expired',
            },
        }
    }
    assert not app.lambda_handler(event, lambda_context)
