test(backups): actually list folders

This commit is contained in:
Houkime 2023-07-03 12:54:43 +00:00 committed by Inex Code
parent 1c28984475
commit ae708e446b

View file

@ -200,13 +200,18 @@ def test_backup_returns_snapshot(backups, dummy_service):
assert snapshot.created_at is not None assert snapshot.created_at is not None
def folder_files(folder):
return [
path.join(folder, filename)
for filename in listdir(folder)
if filename is not None
]
def service_files(service): def service_files(service):
result = [] result = []
for service_folder in service.get_folders(): for service_folder in service.get_folders():
service_filename = listdir(service_folder)[0] result.extend(folder_files(service_folder))
assert service_filename is not None
service_file = path.join(service_folder, service_filename)
result.append(service_file)
return result return result