def test_validate_no_old_format__without_toversion(self, mocker): """ Given: - an old format_file without toversion When: - running validate_no_old_format on the file Then: - return a False as the file is invalid """ mocker.patch.object(BaseValidator, "handle_error", return_value="not-a-non-string") validate_manager = ValidateManager() old_format_files = {"demisto_sdk/tests/test_files/script-valid.yml"} assert not validate_manager.validate_no_old_format(old_format_files)
def test_validate_no_old_format__with_toversion(self): """ Given: - an old format_file with toversion When: - running validate_no_old_format on the file Then: - return a True as the file is valid """ validate_manager = ValidateManager() old_format_files = {"demisto_sdk/tests/test_files/Unifier/SampleScriptPackage/" "script-SampleScriptPackageSanityDocker45_45.yml"} assert validate_manager.validate_no_old_format(old_format_files)