def test_added_new_command_context_path_in_integration(): validator = IntegrationValidator("temp_file", check_git=False) validator.old_integration = { "commands": [{ "name": "test", "outputs": [{ "contextPath": "test" }] }] } validator.current_integration = { "commands": [{ "name": "test", "outputs": [{ "contextPath": "test" }] }, { "name": "test2", "outputs": [{ "contextPath": "new command" }] }] } assert validator.is_changed_context_path() is False, "The script validator found a backward compatibility " \ "issue although the context path has not changed"
def test_changed_context_in_integration(): validator = IntegrationValidator("temp_file", check_git=False) validator.old_integration = { "script": { "commands": [{ "name": "test", "outputs": [{ "contextPath": "test" }] }] } } validator.current_integration = { "script": { "commands": [{ "name": "test", "outputs": [{ "contextPath": "changed that" }] }] } } assert validator.is_changed_context_path(), "The script validator didn't find a backward compatability " \ "issue although the context path has changed"
def test_added_context_in_integration(): validator = IntegrationValidator("temp_file", check_git=False) validator.old_integration = { "commands": [ { "name": "test", "outputs": [ { "contextPath": "test" } ] } ] } validator.current_integration = { "commands": [ { "name": "test", "outputs": [ { "contextPath": "test" }, { "contextPath": "changed that" } ] } ] } assert validator.is_changed_context_path() is False, "The script validator didn't find a backward compatability " \ "issue although the context path has changed"
def test_not_changed_context_in_integration(): validator = IntegrationValidator("temp_file", check_git=False) validator.old_integration = { "commands": [ { "name": "test", "outputs": [ { "contextPath": "test" } ] } ] } validator.current_integration = { "commands": [ { "name": "test", "outputs": [ { "contextPath": "test" } ] } ] } assert validator.is_changed_context_path() is False, "The script validator found a backward compatability " \ "change although no such change was done"