<commit_before>*** Settings ***
Documentation  Mongoose Config API tests
Library  OperatingSystem
Library  RequestsLibrary

*** Variables ***
${DATA_DIR} =  src/test/robot/data
${MONGOOSE_CONFIG_SCHEMA_URI_PATH}=  ${MONGOOSE_CONFIG_URI_PATH}/schema
${MONGOOSE_CONFIG_URI_PATH}=  /config

*** Test Cases ***
Should Return Aggregated Defaults
    Should Return Json  ${DATA_DIR}/aggregated_defaults.json  ${MONGOOSE_CONFIG_URI_PATH}

Should Return Aggregated Schema
    Should Return Json  ${DATA_DIR}/aggregated_defaults_schema.json  ${MONGOOSE_CONFIG_SCHEMA_URI_PATH}

*** Keywords ***
Should Return Json
    [Arguments]  ${expected_json_file_name}  ${uri_path}
    ${file_content} =  Get File  ${expected_json_file_name}
    ${expected_json_data} =  To Json  ${file_content}
    ${resp} =  Get Request  mongoose_node  ${uri_path}
    Should Be Equal As Strings  ${resp.status_code}  200
    Log  ${resp.json()}
    Should Be Equal  ${expected_json_data}  ${resp.json()}<commit_msg>minor fix<commit_after>*** Settings ***
Documentation  Mongoose Config API tests
Library  OperatingSystem
Library  RequestsLibrary

*** Variables ***
${DATA_DIR} =  src/test/robot/data
${MONGOOSE_CONFIG_URI_PATH}=  /config
${MONGOOSE_CONFIG_SCHEMA_URI_PATH}=  ${MONGOOSE_CONFIG_URI_PATH}/schema

*** Test Cases ***
Should Return Aggregated Defaults
    Should Return Json  ${DATA_DIR}/aggregated_defaults.json  ${MONGOOSE_CONFIG_URI_PATH}

Should Return Aggregated Schema
    Should Return Json  ${DATA_DIR}/aggregated_defaults_schema.json  ${MONGOOSE_CONFIG_SCHEMA_URI_PATH}

*** Keywords ***
Should Return Json
    [Arguments]  ${expected_json_file_name}  ${uri_path}
    ${file_content} =  Get File  ${expected_json_file_name}
    ${expected_json_data} =  To Json  ${file_content}
    ${resp} =  Get Request  mongoose_node  ${uri_path}
    Should Be Equal As Strings  ${resp.status_code}  200
    Log  ${resp.json()}
    Should Be Equal  ${expected_json_data}  ${resp.json()}
{'fraction_non_alphanumeric': 0.11326530612244898, 'fraction_numerical': 0.003061224489795918, 'mean_word_length': 5.166666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6256430', 'n_tokens_mistral': 669, 'n_tokens_neox': 658, 'n_words': 144}