mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-22 20:11:30 +00:00
test(backups): actually list folders
This commit is contained in:
parent
1c28984475
commit
ae708e446b
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue