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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user