Refactor test files for improved readability and consistency

- Removed unnecessary blank lines and adjusted formatting in test files.
- Ensured consistent use of commas in function calls and assertions across various test cases.
- Updated import statements for better organization and clarity.
- Enhanced mock setups in tests for better isolation and reliability.
- Improved assertions to follow a consistent style for better readability.
This commit is contained in:
JSC
2025-07-31 21:37:04 +02:00
parent e69098d633
commit 8847131f24
42 changed files with 602 additions and 616 deletions

View File

@@ -132,7 +132,7 @@ class SoundScannerService:
"id": None,
"error": str(e),
"changes": None,
}
},
)
# Delete sounds that no longer exist in directory
@@ -153,7 +153,7 @@ class SoundScannerService:
"id": sound.id,
"error": None,
"changes": None,
}
},
)
except Exception as e:
logger.exception("Error deleting sound %s", filename)
@@ -169,7 +169,7 @@ class SoundScannerService:
"id": sound.id,
"error": str(e),
"changes": None,
}
},
)
logger.info("Sync completed: %s", results)
@@ -219,7 +219,7 @@ class SoundScannerService:
"id": sound.id,
"error": None,
"changes": None,
}
},
)
elif existing_sound.hash != file_hash:
@@ -246,7 +246,7 @@ class SoundScannerService:
"id": existing_sound.id,
"error": None,
"changes": ["hash", "duration", "size", "name"],
}
},
)
else:
@@ -264,7 +264,7 @@ class SoundScannerService:
"id": existing_sound.id,
"error": None,
"changes": None,
}
},
)
async def scan_soundboard_directory(self) -> ScanResults: