diff --git a/tests/test_barman_cloud_backup_delete.py b/tests/test_barman_cloud_backup_delete.py index 70bd6d867..656bfeb34 100644 --- a/tests/test_barman_cloud_backup_delete.py +++ b/tests/test_barman_cloud_backup_delete.py @@ -184,12 +184,14 @@ def _get_sorted_files_for_backup(self, backup_metadata, backup_id): files_for_backup += sorted(additional_files) return files_for_backup - def _create_catalog(self, backup_metadata, wals=[]): + def _create_catalog(self, backup_metadata, wals=None): """ Create a mock CloudBackupCatalog from the supplied data so that we can provide a work-alike CloudBackupCatalog to the code-under-test without also including the CloudBackupCatalog logic in the tests. """ + if wals is None: + wals = [] # Copy so that we don't affect the state the tests are using when the # code under test removes backups from the mock catalog backup_state = backup_metadata.copy()