def test_create_survey_handler_returns_schema_validation_error(
        setup_handler_monkeypatching):
    from src.handlers.create_survey_handler import handler
    result = handler({"bad_key": "bad_value"}, Context)
    assert result['statusCode'] == 400
    assert 'RequestValidationError' in result['body']
def test_create_survey_handler_has_cors_headers(setup_handler_monkeypatching):
    from src.handlers.create_survey_handler import handler
    result = handler(good_event, Context())
    assert result['headers'] == {'Access-Control-Allow-Origin': '*'}
def test_create_survey_handler_has_json_body(setup_handler_monkeypatching):
    from src.handlers.create_survey_handler import handler
    result = handler(good_event, Context)
    assert isinstance(json.loads(result['body']), dict)
def test_create_survey_handler_returns_200(setup_handler_monkeypatching):
    from src.handlers.create_survey_handler import handler
    result = handler(good_event, Context())
    assert result['statusCode'] == 200