Refactor test cases for improved readability and consistency
- Adjusted function signatures in various test files to enhance clarity by aligning parameters. - Updated patching syntax for better readability across test cases. - Improved formatting and spacing in test assertions and mock setups. - Ensured consistent use of async/await patterns in async test functions. - Enhanced comments for better understanding of test intentions.
This commit is contained in:
@@ -19,8 +19,8 @@ from app.utils.audio import (
|
||||
SHA256_HASH_LENGTH = 64
|
||||
BINARY_FILE_SIZE = 700
|
||||
EXPECTED_DURATION_MS_1 = 123456 # 123.456 seconds * 1000
|
||||
EXPECTED_DURATION_MS_2 = 60000 # 60 seconds * 1000
|
||||
EXPECTED_DURATION_MS_3 = 45123 # 45.123 seconds * 1000
|
||||
EXPECTED_DURATION_MS_2 = 60000 # 60 seconds * 1000
|
||||
EXPECTED_DURATION_MS_3 = 45123 # 45.123 seconds * 1000
|
||||
|
||||
|
||||
class TestAudioUtils:
|
||||
@@ -220,7 +220,8 @@ class TestAudioUtils:
|
||||
|
||||
@patch("app.utils.audio.ffmpeg.probe")
|
||||
def test_get_audio_duration_fractional_duration(
|
||||
self, mock_probe: MagicMock,
|
||||
self,
|
||||
mock_probe: MagicMock,
|
||||
) -> None:
|
||||
"""Test audio duration extraction with fractional seconds."""
|
||||
# Mock ffmpeg.probe to return fractional duration
|
||||
|
||||
Reference in New Issue
Block a user