Implement audio record management features in AsyncBotDB and AudioRepository
- Added methods to delete audio moderation records and retrieve all audio records in async_db.py. - Enhanced AudioRepository with functionality to delete audio records by file name and retrieve all audio message records. - Improved logging for audio record operations to enhance monitoring and debugging capabilities. - Updated related handlers to ensure proper integration of new audio management features.
This commit is contained in:
@@ -295,7 +295,7 @@ class TestDownloadFile:
|
||||
with patch('os.path.getsize', return_value=1024):
|
||||
with patch('os.path.basename', return_value='file_123.jpg'):
|
||||
with patch('os.path.splitext', return_value=('file_123', '.jpg')):
|
||||
with patch('helper_bot.utils.helper_func.metrics') as mock_metrics:
|
||||
with patch('helper_bot.utils.metrics.metrics') as mock_metrics:
|
||||
result = await download_file(mock_message, "file_id_123", "photo")
|
||||
|
||||
assert result == "files/photos/file_123.jpg"
|
||||
|
||||
Reference in New Issue
Block a user