示例#1
0
def test_the_existence_of_added_test_in_conf_json():
    validator = ConfJsonValidator()

    validator.conf_data = {"tests": TESTS_SECTION}

    assert validator.is_test_in_conf_json(file_id="alexa"), \
        "The conf validator didn't catch the test although it exists in the test list"
示例#2
0
def test_the_missing_existence_of_added_test_in_conf_json():
    validator = ConfJsonValidator()

    validator.conf_data = {"tests": TESTS_SECTION}

    assert validator.is_test_in_conf_json(file_id="cortana") is False, \
        "The conf validator didn't catch that the test is missing"
示例#3
0
def test_the_existence_of_added_test_in_conf_json():
    validator = ConfJsonValidator()

    validator.conf_data = {
        "tests": TESTS_SECTION
    }

    assert validator.is_test_in_conf_json(file_id="alexa"), \
        "The conf validator didn't catch the test although it exists in the test list"
示例#4
0
def test_the_missing_existence_of_added_test_in_conf_json():
    validator = ConfJsonValidator()

    validator.conf_data = {
        "tests": TESTS_SECTION
    }

    assert validator.is_test_in_conf_json(file_id="cortana") is False, \
        "The conf validator didn't catch that the test is missing"
示例#5
0
def test_is_valid_conf_json_negative_sanity_check():
    validator = ConfJsonValidator()

    validator.conf_data = {
        "skipped_tests": WITH_DESCRIPTION,
        "skipped_integrations": MISSING_DESCRIPTION,
        "unmockable_integrations": MISSING_DESCRIPTION
    }

    assert validator.is_valid_conf_json() is False, \
        "The conf validator didn't find the missing description sections although they don't exist"
示例#6
0
def test_is_valid_conf_json_sanity_check():
    validator = ConfJsonValidator()

    validator.conf_data = {
        "skipped_tests": WITH_DESCRIPTION,
        "skipped_integrations": WITH_DESCRIPTION,
        "unmockable_integrations": WITH_DESCRIPTION,
    }

    assert validator.is_valid_conf_json(), \
        "The conf validator didn't find the description sections although they exist"
示例#7
0
def test_is_valid_conf_json_negative_sanity_check():
    validator = ConfJsonValidator()

    validator.conf_data = {
        "skipped_tests": WITH_DESCRIPTION,
        "skipped_integrations": MISSING_DESCRIPTION,
        "unmockable_integrations": MISSING_DESCRIPTION
    }

    assert validator.is_valid_conf_json() is False, \
        "The conf validator didn't find the missing description sections although they don't exist"
示例#8
0
def test_is_valid_conf_json_sanity_check():
    validator = ConfJsonValidator()

    validator.conf_data = {
        "skipped_tests": WITH_DESCRIPTION,
        "skipped_integrations": WITH_DESCRIPTION,
        "unmockable_integrations": WITH_DESCRIPTION,
    }

    assert validator.is_valid_conf_json(), \
        "The conf validator didn't find the description sections although they exist"