def test_changed_required_field_to_not_required_in_integration(): validator = ScriptValidator('temp_file', check_git=False) validator.old_script = {'args': [{'name': 'test', 'required': True}]} validator.current_script = {'args': [{'name': 'test', 'required': False}]} assert validator.is_added_required_args() is False, 'The script validator found the change to not required ' \ 'as a one who breaks backward compatability'
def test_not_changed_required_field_scenario2_in_integration(): validator = ScriptValidator('temp_file', check_git=False) validator.old_script = {'args': [{'name': 'test', 'required': False}]} validator.current_script = {'args': [{'name': 'test', 'required': False}]} assert validator.is_added_required_args() is False, 'The script validator found a backward compatibility ' \ 'change although no such change was done'
def test_added_required_field_in_integration(): validator = ScriptValidator('temp_file', check_git=False) validator.old_script = {'args': [{'name': 'test', 'required': False}]} validator.current_script = {'args': [{'name': 'test', 'required': True}]} assert validator.is_added_required_args( ), "The script validator couldn't find the new required args"