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:
@@ -359,7 +359,7 @@ class TestSoundRepository:
|
||||
"""Test creating sound with duplicate hash should fail."""
|
||||
# Store the hash to avoid lazy loading issues
|
||||
original_hash = test_sound.hash
|
||||
|
||||
|
||||
duplicate_sound_data = {
|
||||
"name": "Duplicate Hash Sound",
|
||||
"filename": "duplicate.mp3",
|
||||
@@ -373,4 +373,4 @@ class TestSoundRepository:
|
||||
|
||||
# Should fail due to unique constraint on hash
|
||||
with pytest.raises(Exception): # SQLAlchemy IntegrityError or similar
|
||||
await sound_repository.create(duplicate_sound_data)
|
||||
await sound_repository.create(duplicate_sound_data)
|
||||
|
||||
Reference in New Issue
Block a user