Beispiel #1
0
def test_duplicate_arg_in_script():
    validator = ScriptValidator("temp_file", check_git=False)
    validator.yaml_data = {
        "args": [
            {
                "name": "test"
            },
            {
                "name": "test"
            }
        ]
    }

    assert validator.is_there_duplicates_args(), "The script validator didn't found the duplicate arg"
Beispiel #2
0
def test_duplicate_arg_in_script():
    validator = ScriptValidator('temp_file', check_git=False)
    validator.current_script = {
        'args': [
            {
                'name': 'test1'
            },
            {
                'name': 'test1'
            }
        ]
    }

    assert validator.is_there_duplicates_args(), "The script validator didn't found the duplicate arg"
Beispiel #3
0
def test_no_duplicate_arg_in_script():
    validator = ScriptValidator("temp_file", check_git=False)
    validator.yaml_data = {
        "args": [
            {
                "name": "test"
            },
            {
                "name": "test1"
            }
        ]
    }

    assert validator.is_there_duplicates_args() is False, "The script validator found duplicate arg although " \
        "there no such"
Beispiel #4
0
def test_no_duplicate_arg_in_script():
    validator = ScriptValidator('temp_file', check_git=False)
    validator.current_script = {
        'args': [
            {
                'name': 'test1'
            },
            {
                'name': 'test2'
            }
        ]
    }

    assert validator.is_there_duplicates_args() is False, 'The script validator found duplicate arg although ' \
        'there no such'